[R] quantiles for timestep out of large list
marcg
mdgi at gmx.ch
Mon Oct 29 15:28:28 CET 2007
dear R
I have a list consisting of 20 matrices of dimensions (1600, 15).
Out of this list I plot median, max, min values in a timeplot, that works well with the code at the end.
I would like to plot quartile ranges.'m not able to find a way to compute the quantile for every time step.
Thanks a lot for your help
i<-14 #column of matrix to read
min.fun<- function(x){
df_out <- matrix(0,ncol=2, nrow=nrow(x[[1]]))
df_out[,1]<- apply(do.call("rbind", lapply(x, "[[", 1)), 2,
min) #my time-column
df_out[,2]<- apply(do.call("rbind", lapply(x, "[[", i)), 2,
min) #the selected column
return(df_out)
}
min.mc<-min.fun(read)#apply function to my list called read
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
More information about the R-help
mailing list