[R] If and apply?

2012-02-03 Thread brannona
Hello, I'm trying to replace any value within a column where the value is less than 10% of the median of the column with NA. In other words, if the median of one column is 500, any value in that column that is less than 50 should become NA. Doing a lot of searches, it seems like I should be us

[R] Looping columns/column names

2012-01-27 Thread brannona
Hello, I have a data file that I want to run loess on for 36 columns, divide the original data by the new data, then dividing columns that end in A and B by those that end in C. However, I have something wrong in my first step and am completely stuck on the third. Could someone help me please