[R] Reconfiguring wide frame to long frame

From: Jesse Albert Canchola <jesse.canchola.b_at_bayer.com>
Date: Wed 19 Jul 2006 - 02:42:29 EST

Greetings, fellow R'ers.

How can I get this frame in R:

ID meas ID.1 meas.1

1   1.1        3      1.2
2   2.1        4      2.2

to look like this (stacking):

ID meas

1  1.1
2  2.1
3  1.2
4  2.2

It's not really the reshape function (or is it?) because we can consider the additional columns, viz., ID.1 and meas.1, as independent of ID and meas so it is basically a stacking problem (no longitudinal component). I can't seem to find a good example to do this in the docs. Thanks for your help.


Jesse A. Canchola
Biostatistician III
Bayer Healthcare
725 Potter St.
Berkeley, CA 94710

P: 510.705.5855
F: 510.705.5718
E: Jesse.Canchola.b@Bayer.Com


The information contained in this e-mail is for the exclusive use of the intended recipient(s) and may be confidential, proprietary, and/or legally privileged. Inadvertent disclosure of this message does not constitute a waiver of any privilege. If you receive this message in error, please do not directly or indirectly use, print, copy, forward, or disclose any part of this message. Please also delete this e-mail and all copies and notify the sender. Thank you.

For alternate languages please go to http://bayerdisclaimer.bayerweb.com

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch 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. Received on Wed Jul 19 04:12:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 19 Jul 2006 - 06:21:28 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.