R/to_numeric.R

Defines functions to_numeric

to_numeric <- function(x) {
    x <- sub("[,.]([0-9]*)$", ";\\1", x)
    x <- gsub("[,. ]", "", x)
    x <- sub(";", ".", x)
    as.numeric(x)
}
trevorld/ledger documentation built on Nov. 20, 2021, 3:03 p.m.