% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/logical_any.R
\name{logical any}
\alias{logical any}
\alias{\%anygele\%}
\alias{\%anygel\%}
\alias{\%anygle\%}
\alias{\%anygl\%}
\alias{\%anyge\%}
\alias{\%anyg\%}
\alias{\%anyle\%}
\alias{\%anyl\%}
\alias{\%anyin\%}
\alias{\%any!in\%}
\alias{\%anynin\%}
\alias{\%any==\%}
\alias{\%any!=\%}
\alias{\%anyc\%}
\alias{\%anye\%}
\alias{\%anygrepl\%}
\alias{\%any!grepl\%}
\alias{\%anyflipIn\%}
\title{Several ways to evaluate whether any values meet logical conditions}
\usage{
e1 \%anygele\% e2

e1 \%anygel\% e2

e1 \%anygle\% e2

e1 \%anygl\% e2

e1 \%anyge\% e2

e1 \%anyg\% e2

e1 \%anyle\% e2

e1 \%anyl\% e2

e1 \%anyin\% e2

e1 \%any!in\% e2

e1 \%anynin\% e2

e1 \%any==\% e2

e1 \%any!=\% e2

e1 \%anyc\% e2

e1 \%anye\% e2

e1 \%anygrepl\% e2

e1 \%any!grepl\% e2

e1 \%anyflipIn\% e2
}
\arguments{
\item{e1}{A vector to be evaluated.}

\item{e2}{The right hand side value passed to the underlying logical
operator. See \code{\link{logicals}}, \code{\link{\%c\%}}, and
\code{\link{\%e\%}} for operator-specific requirements.}
}
\value{
A logical value whether any \code{e1} meet the logical conditions.
}
\description{
Several ways to evaluate whether any values meet logical conditions
}
\examples{

1:5 \%anygele\% c(2, 4)
1:5 \%anygele\% c(6, 7)

1:5 \%anygel\% c(2, 4)
1:5 \%anygel\% c(6, 7)

1:5 \%anygle\% c(2, 4)
1:5 \%anygle\% c(5, 6)

1:5 \%anygl\% c(2, 4)
1:5 \%anygl\% c(0, 1)

1:5 \%anyge\% 2
1:5 \%anyge\% 6

1:5 \%anyg\% 2
1:5 \%anyg\% 5

1:5 \%anyle\% 2
1:5 \%anyle\% 0

1:5 \%anyl\% 2
1:5 \%anyl\% 1

1:5 \%anyin\% c(2, 99)
c("jack", "jill", "john", "jane") \%anyin\% c("jill", "bill")

1:5 \%any!in\% c(2, 99)
c("jack", "jill", "john", "jane") \%any!in\% c("jill", "bill")

1:5 \%any==\% c(5, 4, 3, 2, 1)
1:5 \%any==\% 6:10

1:5 \%any!=\% 1:5
1:5 \%any!=\% c(5, 4, 3, 2, 1)
## define a variable
sample_data <- c(1, 3, 9, 5, NA, -9)

sample_data \%anyc\% "( >= 1 & <= 10 ) | == -9"
sample_data \%anyc\% "is.na"

## clean up
rm(sample_data)
## define a variable
sample_data <- c(1, 3, 9, 5, -9)

sample_data \%anye\% "(-8, 1] | [2, 9)"

## clean up
rm(sample_data)

c("jack", "jill", "john", "jane") \%anygrepl\% "^ja"
c("jack", "jill", "john", "jane") \%anygrepl\% "zz"

c("jack", "jill", "john", "jane") \%any!grepl\% "^ja"
c("jack", "jill", "john", "jane") \%any!grepl\% "j"

c("a:b", "c:d") \%anyflipIn\% "b:a"
c("a:b", "c:d") \%anyflipIn\% "x:y"
}
