Here are two dataframes, which are identical in information but presented in different format.
t1<-data.frame(n=factor(1:5),x=32:36,y=22:26,z=42:46)
t2<-data.frame(n=factor(rep(1:5,1,each=3)),var=factor(rep(c("x","y","z"),5)),val=c(32,22,42,33,23,43,34,24,44,35,25,45,36,26,46))
I would like to convert t2 to t1. I cannot figure out how to do it with melt/cast/recast/reshape etc.
Regards
Roy Mathew Francis
royfranc...@agrsci.dk
Better to get this question to r-help
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: http://gist.github.com/270442
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2
>