destring: Convert character vector to numeric, ignoring irrelevant...

Description Usage Arguments Value Examples

View source: R/destring.R

Description

Code copied from https://github.com/gsk3/taRifx/blob/master/R/Rfunctions.R#L1161.

Usage

1
destring(x, keep = "0-9.-")

Arguments

x

A vector to be operated on

keep

Characters to keep in, in bracket regular expression form. Typically includes 0-9 as well as the decimal separator (. in the US and , in Europe).

Value

vector of type numeric

Examples

1
2
test <- "50,762.83a"
destring(test)

ksauby/GTMNERRproc documentation built on May 20, 2019, 6:42 p.m.