factor2num: Function to convert vector to class numeric

Description Usage Arguments Value Examples

View source: R/factor2num.R

Description

Function to convert vector to class numeric

Usage

1

Arguments

x

An input vector to be converted to class numeric

Value

output Numeric vector with non-numeric values replaced with NA

Examples

1
2
3
test=factor(c("1","4","ABC","5"))
print(as.numeric(test))
print(factor2num(test))

foramashar/fashaR documentation built on Nov. 15, 2020, 5:05 a.m.