Hi Hadley, On Thu, Feb 28, 2008 at 1:15 PM, hadley wickham <[EMAIL PROTECTED]> wrote: > > I think the problem is that reshape adds some extra information to the > cast data.frame, but this info is no longer relevant when you've > removed some of the columns. Try as.data.frame to strip off this > extra info. > > t <- melt(subset(as.data.frame(t.norm1), select= c("Sample.Name", > "SNP", "Pool", "polar.1", "polar.2")), id=c("Sample.Name", "SNP")) >
Thats done the trick, thank you very much. > (Also, can't you get to cast.height.norm1 directly from norm1 ? > cast.height.norm1 <- cast(norm1, SNP ~ Sample.Name + variable, sum) Yep, you can, but I need t.norm1 as an intermediate for deriving polar.1 and polar.2 for each Sample.Name and SNP, although I wouldn't be surprised if this can be done at the same time, as your reshape() package is exceptionally flexible (and as you can probably tell, I'm still climbing the R learning curve!). In fact I think I shall sit down and work out how to do this! Thanks for your help (again), Neil -- Email - [EMAIL PROTECTED] / [EMAIL PROTECTED] ______________________________________________ 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.