[R] reshape help
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Thu Sep 13 08:05:37 CEST 2007
Ross Darnell wrote:
>
>
> Yup. 2.6.0 will also allow this simplified variant:
>
> > reshape(mydat, direction="long", varying=3:8, sep="")
> tree serra time bt mm id
> 1.1 1 1 1 101 9101 1
> 2.1 2 1 1 102 9102 2
> 3.1 3 1 1 103 9103 3
>
[Ross D]
That's neat but how did the function recognize the difference between the 3:5 and 6:8 structure?
Ross Darnell
(Ross: Your emailer put your reply into my original signature, making it
unquotable without cut&paste. Don't do that....)
It looks at the variable names (the current version can do that as well,
but the case where the separator is not a dot is less easy to specify).
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list