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)
}

Try the ledger package in your browser

Any scripts or data that you put into this service are public.

ledger documentation built on May 29, 2024, 1:21 a.m.