% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PMutilities.R
\name{all_is_numeric}
\alias{all_is_numeric}
\title{Check if all values are numeric}
\usage{
all_is_numeric(x, what = c("test", "vector", "nonnum"), extras = c(".", "NA"))
}
\arguments{
\item{x}{A vector to check.}

\item{what}{A character string indicating what to return.
Can be "test", "vector", or "nonnum".
The default is "test".}

\item{extras}{A character vector of extra values to exclude from the check.
The default is c(".", "NA").}
}
\value{
A logical value indicating if all values are numeric.
If \code{what} is "vector", a numeric vector is returned.
If \code{what} is "nonnum", a character vector of non-numeric values is returned.
If \code{what} is "test", a logical value is returned.
}
\description{
\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}}
Checks if all values in a vector are numeric.
}
\details{
The function checks if all values in a vector are numeric.
It can be used to check if a vector contains only numeric values.
It can also be used to check if a vector contains any non-numeric values.
}
\examples{
\dontrun{
all_is_numeric(c("1", "2", "3"))
all_is_numeric(c("1", "2", "a"))
all_is_numeric(c("1", "2", "3"), what = "vector")
all_is_numeric(c("1", "2", "a"), what = "nonnum")
}
}
