[R] reshape data, adding rows to dataframe
Lucia Rueda
lucia.rueda at ba.ieo.es
Wed Feb 2 11:58:05 CET 2011
Hi Ivan,
Thanks for your reply. This is what I want to do:
Imagine my dataset looks like this:
Species N Size
Coris julis 1 8
Coris julis 3 10
D.vulgaris 2 12
I have 1 C.julis of 8 cm, 3 C. julis of 10 cm and 2 D.vulgaris of 12 cm. I
want 1 row for each animal, something like this:
Species N Size
Coris julis 1 8
Coris julis 1 10
Coris julis 1 10
Coris julis 1 10
D.vulgaris 1 12
D.vulgaris 1 12
I hope that helps. I tried reshape but couldn't do it and from what I've
seen I don't think that aggregate, unique or duplicated would do it... but
I'm not good with R so I can be wrong.
Cheers!
Lucia
--
View this message in context: http://r.789695.n4.nabble.com/reshape-data-adding-rows-to-dataframe-tp3253640p3253780.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list