Hellow! I am replicating the example givien in "Reshaping Data with the reshape Package" (http://www.jstatsoft.org/v21/i12 - see "download" link on the right), p. 2-3.
library(reshape) data(smiths) str(smiths) The text says: "If you specify only one of measured and identifier variables, melt assumes that all the other variables are the OTHER sort:" Hence, the result of the following 5 lines should be identical: melt.data.frame(smiths, id = c("subject", "time"), measured = c("age", "weight","height")) melt.data.frame(smiths, id = c("subject", "time")) melt.data.frame(smiths, id = 1:2) melt.data.frame(smiths, measured = c("age", "weight", "height")) melt.data.frame(smiths) # If you do not specify them explicitly, melt will assume that any factor or character variables are id variables However, only the first 3 lines produce the same result. I am especially surprised why line 4 uses "time" as a measured variable, while it should be clear to reshape that "time" is NOT a measured variable? Thank you! -- Dimitri Liakhovitski Ninah Consulting www.ninah.com ______________________________________________ R-help@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.