reshape(dta, idvar="id", timevar="name", direction="wide")
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Nico Met
Sent: Mittwoch, 26. Juni 2013 13:38
To: R help
Subject: [R] Transpose of the rows
Dear R users,
I am using a big d
dta[,3]<-as.numeric(as.character(gsub(",",".",dta[,3])))
library(reshape2)
dcast(dta,id~name,value.var="value")
# id AreaCycl AreaEmer AreaMax HeightMax nrfilledseed
#1 TN00016-003A -1.3998944 -3.2771509 -3281.077 8.434493 1.825
#2 TN00016-014A -0.5843794 -0.8428928 -
2 matches
Mail list logo