rmNonNumeric: remove non-numeric symbols. Commas, semicolons, white space...

Usage Arguments Details Value Examples

View source: R/rmNonNumeric.R

Usage

1
rmNonNumeric(x, other = list("oO", ","), fw = list(0, ""))

Arguments

x

a string vector

other

list of extra symbols to be replaced with fw

fw

list. Must be compatible with other

Details

remove non-numeric symbols as commas, semicolons, white space between numbers, and changes the letters "o" and "O" by zeros (0). String characters coerce them to NA's

Value

a numeric vector or a error mesage if still non-numeric symbols remaining

Examples

1
2
3
xe <- c("2,000", "4 5    6", "300OOoo", "4.4", "abc", "ab1")
rmNonNumeric(xe)
rmNonNumeric(xe, other = list("oO", ","), fw = list(0, ""))

mathphysmx/cleanTable documentation built on May 29, 2019, 2:51 p.m.