I have a simulation program that generates a data frame for each run. I
aggregate the data.frames into a list (df.list). The structure of all data
frames is the same, only the values are different.
I then want to aggregate the various runs. Currently I use the following
method (for three runs):
means = (df.list[[1]]$variable + df.list[[2]]$variable +
df.list[[3]]$variable)/3
I would like to do this in a more parsimonious way, for example using lapply
or related commands, but I can't seem to figure out the magic touch. Any
thoughts on the best way to accomplish this?
Thanks and regards,
Magnus
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.