[R] Stacking data

hadley wickham h.wickham at gmail.com
Thu Jan 29 21:13:47 CET 2009


 Â Â Â Â Â Â Â Â Â Â  Â Â  27193Â Â Â  30949 Â  Â Â  V2
>
> But i have 41 columns (age column  +  40 individuals)
> I have the following script but an error is thrown up
> can anyone help, where am i going wrong
>
> zz <- read.csv("Filename.csv",strip.white = TRUE)

Try this:

install.packages("reshape")
library(reshape)
zzz <- melt(zz)

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list