[R] is member
Sarah Goslee
sarah.goslee at gmail.com
Fri Sep 30 18:29:40 CEST 2011
> 5 %in% seq(1,800,4)
[1] TRUE
> 4 %in% seq(1,800,4)
[1] FALSE
or
> is.element(5, seq(1,800,4))
[1] TRUE
> is.element(4, seq(1,800,4))
[1] FALSE
Sarah
On Fri, Sep 30, 2011 at 12:25 PM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
> I have a vector with number that some of them are part of the
>
> seq(1,800,4). How can I check which of the numbers belong to the seq(1,800,4)
>
> LEt's say that is called myvector the vector with the numbers.
> Is there in R something like this?
> is.member(myvector,seq(1,800,4))
>
> I would like to thank you in advance for your help
>
> B.R
> Alex
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list