Dear Gundala,
Try
as.data.frame.table(foo)
HTH,
Jorge.-
On Fri, Feb 1, 2013 at 5:00 PM, Gundala Viswanath wrote:
I have the following data frame:
foo
w x y z
n 1.51550092 1.4337572 1.2791624 1.1771230
q 0.09977303 0.8173761 1.6123402 0.1510737
r
newdf-data.frame(k1=rep(row.names(foo),ncol(foo)),stack(foo))
--- On Fri, 1/2/13, Gundala Viswanath gunda...@gmail.com wrote:
From: Gundala Viswanath gunda...@gmail.com
Subject: [R] Transforming 4x3 data frame into 2 column df in R
To: r-h...@stat.math.ethz.ch r-h...@stat.math.ethz.ch
Date
Subject: [R] Transforming 4x3 data frame into 2 column df in R
I have the following data frame:
foo
w x y z
n 1.51550092 1.4337572 1.2791624 1.1771230
q 0.09977303 0.8173761 1.6123402 0.1510737
r 1.17083866 1.2469347 0.8712135 0.8488029
What I want to do
I have the following data frame:
foo
w x y z
n 1.51550092 1.4337572 1.2791624 1.1771230
q 0.09977303 0.8173761 1.6123402 0.1510737
r 1.17083866 1.2469347 0.8712135 0.8488029
What I want to do is to change it into :
newdf
1 nw 1.51550092
2 q w
4 matches
Mail list logo