[R] Convert a "by" list into a data frame

From: Tudor Bodea <gtg757i_at_mail.gatech.edu>
Date: Mon 27 Jun 2005 - 12:10:14 EST

Dear useRs,

Is there a way to convert a list generated by "by" command into a data frame? Or, more generally, are there any functions that operate on "by" lists? My "by" list consists of numeric vectors of equal length and the objective is to calculate the sum of the same index elements (i.e., column-wise sums). For example, if the "by" list were



Data_DF$CASE: 1
       IVTT     COST

[1,] 1 2
-------------------------- Data_DF$CASE: 2 IVTT COST
[1,] 2 4
---------------------------

I would like to finally obtain a numeric vector:

result
[1] 1.5 3

Thank you.

--
Tudor Dan Bodea
Georgia Institute of Technology
School of Civil and Environmental Engineering

______________________________________________
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 Mon Jun 27 12:15:54 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:03 EST