[R] R: rearranging data frame rows

From: Vittorio <vdemart1_at_tin.it>
Date: Sat 24 Jun 2006 - 02:25:13 EST


Have a look at merge.
Ciao
Vittorio

>----Messaggio originale----
>Da:
f.calboli@imperial.ac.uk
>Data: 23-giu-2006 18.10
>A: "r-help"<r-

help@stat.math.ethz.ch>
>Ogg: [R] rearranging data frame rows
>
>Hi
All,
>
>I have two data frames. The first contains data about a number
of individuals,
>coded in the first column with a name, in an order I
find convenient.
>
>The second contains different data about the same
indivduals, in a different
>order. Both data frame have the individual
names in the first column.
>
>I need to reorder the second data frame
so the rows are rearranged in the same
>manner as the fist. How?
>
>I
cannot turn the individual names in a numeric vairable with
>as.numeric

(data1[,1]), because the two data frames are subset of different data,
>so the the factor levels are way off between the two. I think I need
to actually
>use the names as a index.
>
>Cheers,
>
>Fede
>
>--
>Federico C. F. Calboli
>Department of Epidemiology and Public Health
>Imperial College, St Mary's Campus
>Norfolk Place, London W2 1PG
>
>Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193
>
>f.calboli [.a.
t] imperial.ac.uk
>f.calboli [.a.t] gmail.com
>
>______________________________________________
>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
>



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 Received on Sat Jun 24 02:27:59 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 Sat 24 Jun 2006 - 04:12:22 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.