is.element(el, set) el %in% set
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
.
bdLogical
the length of
el
. Its ith value is
TRUE
if
el[i]
is in
set
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.
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