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 May 21, 2024, 6:53 a.m.