[R] Data frame index?

From: Kenneth Cabrera <krcabrer_at_epm.net.co>
Date: Wed 18 Jan 2006 - 18:35:35 EST

Hi, R users:

I have a data.frame (not a matrix), I got a vector with the same length as the
number of records (rows) of the data frame, and each element of that vector is the column number (in a specific range of columns) of the corresponding
record that I must set to zero.

How can I do this without a "for" loop?

Thank you for your help.


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 Received on Wed Jan 18 18:44:31 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:05 EST