1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/to_numeric.R
\name{coerce_to_numeric}
\alias{coerce_to_numeric}
\title{Convert to Numeric (if possible)}
\usage{
coerce_to_numeric(x)
}
\arguments{
\item{x}{A vector to be converted.}
}
\value{
Numeric vector (if possible)
}
\description{
Tries to convert vector to numeric if possible (if no warnings or errors).
Otherwise, leaves it as is.
}
\examples{
coerce_to_numeric(c("1", "2"))
coerce_to_numeric(c("1", "2", "A"))
}
|