oject.org"
Cc:
Sent: Thursday, January 24, 2013 5:06 AM
Subject: [R] long format with reshape
Hello,
I tried using reshape to rearrange my data to long format but I could
not get the output the table they way I wanted it. Anyway I came up
with a hack that does works, but I still would like to
Hi, Daisy,
try
dat2 <- reshape( dat, varying = c( "species1", "species2", "species3"),
v.name = "presence", timevar = "species",
times = c( "species1", "species2", "species3"),
direction="long")
dat2[ rev( order( dat2$region)), ]
Hth -- Ger
Hello,
I tried using reshape to rearrange my data to long format but I could
not get the output the table they way I wanted it. Anyway I came up
with a hack that does works, but I still would like to know if I can
do it with reshape.
Here is my code and a dummy set of data. It returns the data in
3 matches
Mail list logo