I have a dataset with 20 columns and ~600,000 rows.

Column 1 has a number from 2-19.  This number tells
me, for each row, which column has the “applicable”
data.  (i.e. the data that I wish to use for each
individual row)

I want to create a vector that contains the data from
the value in column 1.

e.g. 
If column 1, row 1, has a value of “6”, I want to
obtain the value in column 6, row1.

If column1, row 2, has value of “2”, I want to obtain
the value in column 2, row2. etc


I have created a for next loop to do this, but am
looking for a more efficient manner.

Thanks.

______________________________________________
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

Reply via email to