[R] summarizing a complex dataframe

2012-01-11 Thread Christopher G Oakley
I need some help summarizing complex data frames (small example below): m1_1 m2_1 m3_1 m1_2 m2_2 m3_2 i1111222 i1211222 i2221222 For an arbitrary number of columns (say m1 …. m199) where the column names have

[R] convert count data to binary data

2011-05-06 Thread Christopher G Oakley
Is there a way to generate a new dataframe that produces x lines based on the contents of a column? for example: I would like to generate a new dataframe with 70 lines of data[1, 1:3], 67 lines of data[2, 1:3], 75lines of data[3,1:3] and so on up to numrow = sum(count). > data pop fam yesorno