[R] Condition %in%
Phil Spector
spector at stat.berkeley.edu
Mon Sep 13 23:48:20 CEST 2010
!10 %in% x
(or !(10 %in% x) if you don't believe in R's precedence rules.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Mon, 13 Sep 2010, Mestat wrote:
>
> Hi listers,
> If I would like to check if a variable contains certain value, I would
> write:
> if (10 %in% x)
> And If I would like to check the opposite, that 10 is not into x. How would
> be?
> Thanks in advance,
> Marcio
> --
> View this message in context: http://r.789695.n4.nabble.com/Condition-in-tp2538110p2538110.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list