Hi,
you could try the reshape package,
l = list(d1= data.frame(ID=letters[1:4],value=1:4),
d2= data.frame(ID=letters[1:4],value= -c(1:4)))
library(reshape)
m = melt(l)
cast(m, .~ID, fun=mean)
HTH,
baptiste
2009/7/15 Mark Na mtb...@gmail.com
Dear R-helpers,
I have a list
Dear R-helpers,
I have a list containing 5000 elements, each element is a dataframe
containing one ID column (identical over the 5000 dataframes) and 9 numeric
variables, e.g.
ID VAR1 VAR2 VAR3 ... VAR9
I would like to create a new dataframe containing the ID column and the mean
values of the 9
2 matches
Mail list logo