dimitris fekas wrote on 01/18/2012 03:21:44 AM:
> I have a data frame and I would like to reshape it to wide format
> while at the same time applying different aggregate functions to
> each column AND at times multiple aggregate functions:
>
> test1 = data.frame(
> id = c(rep('101',
Hello, and thanks for your answer,
I have melted the data already and can reshape it with cast alright, but I
still can find no way to provide a list of aggregate functions per column,
nor multiple aggregate functions for some of them (i.e. mean AND stdev)
--
View this message in context:
http:
This sounds like a job for the melt/cast scheme for the reshape package.
There is a tutorial for using it here:
http://www.r-statistics.com/2012/01/aggregation-and-restructuring-data-from-r-in-action/
Good luck,
Tal
Contact
Details:
I have a data frame and I would like to reshape it to wide format while at the
same time applying different aggregate functions to each column AND at times
multiple aggregate functions:
test1 = data.frame(
id = c(rep('101',8),rep('102',8)),
phase = rep(c('D','D','L','L'),4)
4 matches
Mail list logo