Given a vector, e.g. x
apply(X=matrix(x,nrow=2),MARGIN=2,FUN=median)
tapply(X=x,INDEX=gl(length(x)/2,2),FUN=median)
sapply(seq(1,length(x)/2,by=2), function(i) (x[i]+x[i+1])/2)
Thanks a lot, Jochen. It works :).
actually .... the option: tapply(X=x,INDEX=gl(length(x)/2,2),FUN=median ; works best, simple and straight forward :).
I run: install.packages("devtools") in my terminal & get the error message: bash: syntax error near unexpected token `"devtools"'. Any ideas of how I can successfully install this R package...
10 November 2016 4,291 0 View
I'm analyzing some graphs in R, and have an error with "community.to.membership". I get error message "Error: could not find function "community.to.membership", anyone seen it before? When I type...
09 October 2015 6,182 2 View
11 December 2014 265 4 View
Suppose I have a table, T3. I would like to find unique values by removing repeated rows (with reversed entries, e.g. row 1 and 4). The final table I need should look like T4. Simply using...
10 November 2014 8,520 3 View
06 July 2014 1,197 2 View
I've the data in the "Table" given below (as generated from R-package), does anyone out there know how to get the median values as shown in "output"? I've tried using "tapply" but this only works...
05 June 2014 4,750 1 View
[problem in R]: How can I compute the medians of the rows in the matrix x3; where, e.g. x1
02 March 2014 4,217 2 View
Given the table "Tgiven", I need to compute the median "val_med" of the columns "val1" and "val2", i.e. need to get the table "Trequired" Below is a simple data structure that mimics the more...
02 March 2014 1,968 6 View
Just loaded, read and worked with ".txt" and ".csv" files in R (no problems), but having trouble loading ".dat" files.
02 March 2014 9,043 8 View
Suppose I have the variables: groups and values in Table 1. Can someone suggest to me how I can obtain the result of the median of the groups as indicated in the table named "Output": groups
02 March 2014 6,009 4 View
Hiiiii everyone! I have an enquiry on statistical analysis. I was looking for many forum and it's still cannot solve my problem. I want to compare means of two groups of data but only with two...
03 March 2021 8,796 3 View
What's the best way to measure growth rates in House sparrow chicks from day 2 to day 10? Since, the growth curve from day 2 to 10 won't be like the "Logistic curve" it might not follow logistic...
03 March 2021 1,401 3 View
Hello, I have a mechanism where air rises due to convective flows. In this simulation, nothing is driving the air except this. I understand that the Boussinesq approximation only works for small...
02 March 2021 4,910 3 View
Good afternoon, I recently used OmniLog from BIOLOG for my experimentations : I tested the metabolism of different strains on 2 types of plates. I have 16 strains of 3 different groups...
02 March 2021 3,584 1 View
I am wanting to calculate the average trend in maximum annual NDVI in Iceland from 2010-2020 using MODIS MYD13Q1 V6. How would I do this? I have currently inserted the NDVI bands from the MODIS...
02 March 2021 752 2 View
I want to make a stacked bar graph with showing each data value as dots. I tried with graph pad prism, version 6, but could not succeed. Does anyone have tried before making such graphs?
01 March 2021 9,383 1 View
I am studying the potential of DCT and FFT coefficients extracted from a signal to classify the different objects that emit the signal. I applied the Shapiro-Wilk to confirm that data was not...
01 March 2021 8,079 2 View
I'm having a problem with my bloxplot with Shannon's and Simpson's indexs. The value of Shannon for my Community 1 indicating higher diversity (in relation of the Community 2), but have lower...
26 February 2021 3,033 9 View
Hello. I have a question whether if my coefficients (statistically significant) would be valid when VIFs are really high. In my model, there are independent variables(IV), moderating variables...
26 February 2021 956 13 View
I am trying to make an SEM model in AMOS for my dissertation but having some trouble with getting a good fit. I am looking for relationships between self-efficacy reported on a Likert scale and...
26 February 2021 8,642 4 View