File: coerce_to_numeric.Rd

package info (click to toggle)
r-cran-datawizard 1.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,300 kB
  • sloc: sh: 13; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 502 bytes parent folder | download | duplicates (2)
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"))
}