[R] rhsape2 bug?

arun smartpink111 at yahoo.com
Sun Jul 22 02:35:10 CEST 2012


Hi,

It works for me too.  When I had reshape and reshape2 both loaded, I had the same problem.  


 library(reshape2)
 tmp <- melt(smiths,
     id.vars=1:2,
     measure.vars=c("age","weight","height"),
     variable.name="myvars",
     value.name="myvals"
 )
 
 names(tmp)
[1] "subject" "time"    "myvars"  "myvals" 


#Now with reshape loaded.

> library(reshape)
Loading required package: plyr

Attaching package: ‘reshape’

The following object(s) are masked from ‘package:plyr’:

    rename, round_any

The following object(s) are masked from ‘package:reshape2’:

    colsplit, melt, recast


tmp <- melt(smiths,
      id.vars=1:2,
      measure.vars=c("age","weight","height"),
      variable.name="myvars",
      value.name="myvals"
  )


> names(tmp)
[1] "subject"  "time"     "variable" "value"   


A.K.

----- Original Message -----
From: darnold <dwarnold45 at suddenlink.net>
To: r-help at r-project.org
Cc: 
Sent: Saturday, July 21, 2012 7:06 PM
Subject: [R] rhsape2 bug?

All,

I believe I am running the latest version of rshape2 (1.2.1). But this code:

library(reshape2)

tmp <- melt(smiths,
     id.vars=1:2,
     measure.vars=c("age","weight","height"),
     variable.name="myvars",
     value.name="myvals"
)

names(tmp)

Produces this output:

> names(tmp)
[1] "subject"  "time"     "variable" "value" 

So you can see that these lines of code don't work:

     variable.name="myvars",
     value.name="myvals"

Is this a bug?

David



--
View this message in context: http://r.789695.n4.nabble.com/rhsape2-bug-tp4637331.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list