R/base30toNumeric.R

Defines functions base30toNumeric

Documented in base30toNumeric

#' @rdname base30and36conversion
#' @export
base30toNumeric <- function(x) {
  symbols <- rev(strsplit(tolower(x), "")[[1]]);
  res <- 0L;
  for (i in seq_along(symbols)) {
    res <- res + (30^(i-1L) * (which(base30==symbols[i])-1L));
  }
  return(res);
}

Try the justifier package in your browser

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

justifier documentation built on March 7, 2023, 6:59 p.m.