Tell if items are in a set.

DESCRIPTION:

Indicates whether items are elements of a given set.

USAGE:

is.element(el, set) 
el %in% set

REQUIRED ARGUMENTS:

el
A vector or bdVector of potential elements of the set. This should be an atomic vector (not a list) and should be the same type of data as set.
set
A vector containing all the elements of the set.

VALUE:

A logical vector or bdLogical the length of el. Its ith value is TRUE if el[i] is in set

DETAILS:

el %in% set means the same as is.element(x,set) but some find it more convenient to type. Note that in a formula object, as used in the aov() function, it means that effects are nested.

SEE ALSO:

, , , , , .

EXAMPLES:

is.element(c("Belgium", "Rhode Island"), state.name) 
# expect to get 
# [1] F T 
c("Belgium", "Rhode Island") %in% state.name
# expect the same answer