[R] if statement of a vector

2009-02-23 Thread bioinformatics_guy
right now I have a vector of about 1000 points. I'd like to iterate through each of these points and and test if it is greater than a certain value and if not, throw it out. x=vector y=empty vector j=0 for i (0..length[vector]) if x[i] 10 y[j] = x[i] j++ Thats

Re: [R] if statement of a vector

2009-02-23 Thread Jorge Ivan Velez
Hi there, Try this: x-your.vector x[x10] HTH, Jorge On Mon, Feb 23, 2009 at 12:31 PM, bioinformatics_guy wwwhite...@gmail.comwrote: right now I have a vector of about 1000 points. I'd like to iterate through each of these points and and test if it is greater than a certain value and if