Re: [R] searching a vector

About this list Date view Thread view Subject view Author view Attachment view

From: kjetil@acelerate.com
Date: Mon 31 May 2004 - 07:22:14 EST


Message-id: <40BA1846.18174.683834D@localhost>

On 30 Apr 2004 at 9:33, Arend P. van der Veen wrote:

> x <- c(1,2,4,6,8,10,12)
> 6 %in% x
[1] TRUE
>

Kjetil Halvorsen

> Hi,
>
> I have a integer vector x that contains a unique set of numbers:
>
> x <- c(1,2,4,6,8,10,12)
>
> Is there a simple test I can use to determine if an integer such as 6
> is contained in x ?
>
> Thanks in advance for any help,
> Arend
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST