Re: [R] how to transpose a dataframe

2009-07-09 Thread milton ruser
Hi roachyang, you need to be more precise on your email. But believe that you tryed one of the funtions like reshape or transform and the output has been printed on your R session. If your dataset are large, is better you assign your output on a object - like myobj<-reshape(...) - and then save yo

Re: [R] how to transpose a dataframe

2009-07-09 Thread roachyang
Seems like this is the one, though I'm not sure how to use it. Bill.Venables wrote: > > Look at the 'reshape' package, with functions melt() and cast() > > (I'm not sure how the remark about the virtues of SAS is relevant, but if > you really want SAS, I presume you know where to find it.) > _

Re: [R] how to transpose a dataframe

2009-07-09 Thread Bill.Venables
Look at the 'reshape' package, with functions melt() and cast() (I'm not sure how the remark about the virtues of SAS is relevant, but if you really want SAS, I presume you know where to find it.) From: r-help-boun...@r-project.org [r-help-boun...@r-projec

Re: [R] how to transpose a dataframe

2009-07-09 Thread Henrique Dallazuanna
try this: transform(stack(DF, select = -level), values = DF$level) On Thu, Jul 9, 2009 at 10:30 PM, roachyang wrote: > > I want to transpose a dataframe like > level 2006 2007 2008 >A >B . >C > into > levelyear >

Re: [R] how to transpose a dataframe

2009-07-09 Thread milton ruser
Hi there, ?reshape do the job. bests milton On Thu, Jul 9, 2009 at 9:31 PM, roachyang wrote: > > I want to transpose a dataframe like > level 2006 2007 2008 >A >B . >C > into > levelyear >A 2006 >

Re: [R] how to transpose a dataframe

2009-07-09 Thread Rolf Turner
On 10/07/2009, at 1:31 PM, roachyang wrote: I want to transpose a dataframe like level 2006 2007 2008 A B . C into levelyear A 2006 A 2007 A 2008 B 2006