Hello,
unfortunately, I don't know a better subject. I would like to be very flexible
in how to process my data.
Assume the following dataset:
par1 <- seq(0,1,length.out = 100)
par2 <- seq(1,100)
fac1 <- factor(rep(c("group1", "group2"), each = 50))
fac2 <- factor(rep(c("group3", "group4", "group5", "group6"), each = 25))
df <- data.frame(par1, par2, fac1, fac2)
Now, I would like to calculate e.g. the "sum" for par1 grouping by "fac1" and
the "mean" and "sd" for par2 grouping by "fac1".
I would like to determine this method as a string.
In the end, I would like to have something like this:
fac1.analysis:
par1.sum par2.mean par2.sd
group1 xxx xxx xxx
group2 xxx xxx xxx
fac2.analysis:
...
Does anybody have any idea how to realize it?
Antje
______________________________________________
[email protected] 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.