On Thu, Jan 22, 2009 at 9:09 AM, Christopher W. Ryan <cr...@binghamton.edu> wrote: > I probably did not explain my data clearly. I am starting with a > dataframe with three columns: > > redlognumb radiologist barrtotal > > where the entries in the variable radiologist are either 1 or 2, > indicating which radiologist generated that barrtotal. All subjects had > their X-ray read independently by both radiologists. So there are two > rows for each subject. > > I want to convert it to this structure: > > redlognumb radiologist.1.barrtotal radiologist.2.barrtotal > > in which there is only one row for each subject. > > At any rate, in the meantime, I think I figured out that I was "melting" > improperly, and I think I've got it now. Thanks.
You should just be able to cast like: cast(m, redlognumb ~ radiologist + variable) If you haven't already, you might want to look at the introduction available at http://had.co.nz/reshape Regards, Hadley -- http://had.co.nz/ ______________________________________________ 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.