[R] matrix to write table with new vector after calculation of one vector
nabiul khan
nabiulkhan at gmail.com
Thu Mar 25 16:42:11 CET 2010
Dear Friends,
I have a data matrix with 500 rows and 5 columns. The 1st row contains
integer code (1, 2, 3). Other rows are real data. I want to convert
the real data in 5th column based on CODES in 1st column, meaning
conversion process are three types (depending on codes 1,2,3. Finally
I want to use write.table command to get 500 rows with 6 columns
(including converted data in 6th col).
how can i do it?
i failed by matrix, read.table and write.table commands.
i would appreciate, if someone helps me out.
Nabi
More information about the R-help
mailing list