[R] convert count data to binary data
Christopher G Oakley
coakley at bio.fsu.edu
Fri May 6 22:15:04 CEST 2011
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 count
1 126 1 70
1 127 1 67
1 128 1 75
1 126 0 20
1 127 0 23
1 128 0 15
Thanks,
Chris
Department of Biological Science
Florida State University
319 Stadium Drive
Tallahassee, FL 32306-4295
More information about the R-help
mailing list