% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class.r
\name{isVector}
\alias{isVector}
\title{Check if Any of Given Vector Types}
\usage{
isVector(x, mode = "any")
}
\arguments{
\item{x}{an \strong{R} object.}

\item{mode}{character string (or chr vector) naming an atomic mode
or \code{"list"} or \code{"expression"} or \code{"any"}. When using \code{"any"}, it
must be given on its own.}
}
\value{
\code{TRUE} or \code{FALSE}.
}
\description{
Wrapper around \link{is.vector} that allows the \code{mode} argument to
accept a character vector of multiple specific types. \code{TRUE}
is returned if the given object is \strong{any} of the given types.
}
\details{
See \link{is.vector} for full details and for the types that can be
checked with \code{mode}.
}
\examples{
x <- c(a = 1, b = 2)
isVector(x) # default `mode` is "any"

# "any" can't be given with other types.
try(isVector(x, mode = c("numeric", "any")))

# `TRUE` is returned if *any* of the types are matched.
isVector(x, mode = c("character", "list", "logical", "numeric"))
isVector(x, mode = c("character", "list", "logical"))
}
\seealso{
\link{is.vector}, \link{typeof}.
}
