[R] Help with script
PABLO ORTIZ PINEDA
pablo.ortiz at yale.edu
Fri Dec 29 01:03:10 CET 2017
Hello there. Happy new year for everyone!
I need help with a table. This table contains 300 rows and 192 columns.
Being the first column the ID of my samples that can have several
observations.
I need to generate e NEW table that contains a single ID with the sum of
the observations by columns:
For example:
Example
ID A B C D E F G.... 191 columns
a1 0 0 0 1 1 2 0...
a2 0 1 0 1 2 2 1...
a2 0 1 1 2 0 2 1...
a3 0 1 1 1 1 1 1....
...300rows
In this case I want to make a new table in which there is only 1 ID and
the values of each columns A...G are added. I
n the example the new table would have only 3 IDs. a1, a2 and 3 and a2
has the values added by column:
a2 0 2 1 3 2 4 2..
Thank you so much and have a wonderful year!.
--
Pablo A. Ortiz-Pineda (Ph.D.)
Molecular Biology & Bioinformatics
Yale University. School of Medicine.
Pediatrics Department.
New Haven, CT 06510
[[alternative HTML version deleted]]
More information about the R-help
mailing list