as.numericSilent: Convert any vector to numeric, if possible

Description Usage Arguments Value Author(s) See Also Examples

View source: R/as.numericSilent.R

Description

Convert any vector to numeric, if possible

Usage

1

Arguments

x

vector of any type

Value

If as.numeric(x) produces an error or warning, x is returned unchanged. Otherwise, as.numeric(x) is returned.

Author(s)

Landon Sego

See Also

as.numeric

Examples

1
2
3
as.numericSilent(c("this","that"))
as.numericSilent(c("2893.9","9423.48"))
as.numericSilent(c("392.1", "that"))

Smisc documentation built on Nov. 21, 2017, 9:02 a.m.