[R] Odp: if statement of a vector
petr.pikal at precheza.cz
Tue Feb 24 10:09:13 CET 2009
r-help-bounces at r-project.org napsal dne 23.02.2009 18:31:32:
> right now I have a vector of about 1000 points. I'd like to iterate
> each of these points and and test if it is greater than a certain value
> if not, throw it out.
> y=empty vector
> for i (0..length[vector])
> if x[i] > 10
> y[j] = x[i]
This Is R not C.
y <- x[x>10]
I recommend you to have a look into the R intro where you can find some
quite basic manipulations with objects.
> Thats basically some pseudo code of what I want to do. Any suggestions?
> View this message in context:
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help