[R] Concatenate dataframe
Ronaldo Reis Jr.
chrysopa at insecta.ufv.br
Tue May 6 23:07:28 CEST 2003
Hi,
thanks for help on index in a for for looping. its work.
Now I have another doubt.
I have a data.frame like this:
nsps area
1 1 4
2 0 9
3 1 4
4 1 4
5 1 4
6 1 9
7 0 4
8 1 9
9 0 4
10 1 9
...
I try to make another data.frame like this:
nsps area
1 4 4
2 3 9
using tapply, it work:
> tapply(betarea1$nsps,betarea1$area,sum)
4 9 16 25 36 49 64 81 100 121 144
4 10 11 19 25 34 36 44 49 49 56
But i need it on a data.frame where the first line of this tapply result is
the area column and the second line is the nsps column.
Any idea for make this?
Thanks
Ronaldo
--
A democracia e a arte e ciencia de administrar o circo a
partir da jaula dos macacos.
-- H. L. Mencken
--
| // | \\ [*****************************][*******************]
|| ( õ õ ) [Ronaldo Reis Júnior ][PentiumIII-600 ]
| V [UFV/DBA-Entomologia ][HD: 30 + 10 Gb ]
|| / \ [36571-000 Viçosa - MG ][RAM: 128 Mb ]
| /(.''`.)\ [Fone: 31-3899-2532 ][Video: SiS620-8Mb ]
||/(: :' :)\ [chrysopa at insecta.ufv.br ][Modem: Pctel-onboar]
|/ (`. `'` ) \[ICQ#: 5692561 ][Kernel: 2.4.18 ]
|| ( `- ) [*****************************][*******************]
||| _/ \_Powered by GNU/Debian W/Sarge D+ || Lxuser#: 205366
More information about the R-help
mailing list