Re: [R] help to sum up data frame

2010-11-08 Thread jim holtman
Nice thing about R is there is more than one way of doing something: x name ip Bsent Breceived 1 a 1 0.00 0.00 2 a 2 1.43 19.83 3 a 1 0.00 0.00 4 a 2 1.00 1.00 5 b 1 0.00 2.00 6 b 3 0.00 2.00 7 b 2 2.00 0.00 8 b

[R] help to sum up data frame

2010-11-07 Thread Mohan L
Dear All, I have a data frame like this: name ip Bsent Breceived a 10.00 0.00 a 2 1.43 19.83 a 1 0.00 0.00 a 21.00 1.00 b 10.00 2.00 b 3 0.00 2.00 b

Re: [R] help to sum up data frame

2010-11-07 Thread David Winsemius
On Nov 7, 2010, at 8:59 AM, Mohan L wrote: Dear All, I have a data frame like this: name ip Bsent Breceived a 10.00 0.00 a 2 1.43 19.83 a 1 0.00 0.00 a 21.00 1.00 b 10.00

Re: [R] help to sum up data frame

2010-11-07 Thread John Kane
With your data set as the data.frame xx library(reshape2) xx - melt(xx) dcast(xx, name ~ variable, sum) --- On Sun, 11/7/10, Mohan L l.mohanphys...@gmail.com wrote: From: Mohan L l.mohanphys...@gmail.com Subject: [R] help to sum up data frame To: r-help@r-project.org Received: Sunday