[R] Reshaping a data frame with a series of factors and 23 repeated measures
Ista Zahn
istazahn at gmail.com
Mon Mar 29 21:35:24 CEST 2010
Hi Bill,
Without an example dataset it's hard to see exactly what you need to
do. But you can get started by looking at the documentation for the
reshape function (?reshape), and by looking at the reshape package.
The reshape package has an associated web page
(http://had.co.nz/reshape/) with links to papers and other information
to help you get started.
Best,
Ista
On Mon, Mar 29, 2010 at 3:15 PM, wclapham <william.clapham at ars.usda.gov> wrote:
>
> I have a data frame that I created using read.table on a csv spreadsheet.
> The data look like the following:
>
> Steer.ID stocker.trt Finish.trt Date Days Wt ......
>
> Steer.Id, stocker.trt, Finish.trt are factors------ Date, Days, Wt are data
> that are repeated 23 times (wide format).
>
> I want to reshape the data such that I have the correct Steer.ID,
> stocker.trt, Finish.trt identifying all of the repeated measures data in a
> long format.
>
> I am a newbie at R and need to develop the skill in reshaping data, so that
> I can handle routine problems like described above.
>
> Thanks so much in advance for help or advice.
>
> Bill
> --
> View this message in context: http://n4.nabble.com/Reshaping-a-data-frame-with-a-series-of-factors-and-23-repeated-measures-tp1695500p1695500.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.
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
More information about the R-help
mailing list