Skip to content

aggregate and stack

2 messages · Paulo Brando, Stephen D. Weigand

#
Dear Paulo,
On May 25, 2005, at 8:01 PM, Paulo Brando wrote:

            
In case you didn't notice, help(aggregate) indicates that 'FUN'
should be a scalar function, so summary won't work for that reason.
It's hard to know where 'growth' came from. Is it your own data.frame,
or from a package? It's better to provide a reproducible or toy example
(as you'll often read here).
This comes to my mind:

as.vector(as.matrix(growthresumo[,3:50]))

but look up the help on stack() because it's a very powerful tool that
is aptly named (and might do everything you want).
rep() could help with the above.
paste() will help with this.
Good luck with R!

Stephen