R/leadZeros.R

Defines functions leadZeros

Documented in leadZeros

leadZeros <-
function(n, m) {
  max.zeros <- nchar(as.character(round(m)))
  tmp.digits <- nchar(as.character(round(n)))
  zeros.toAdd <- max.zeros - tmp.digits
  returnVect <- c(rep("0", zeros.toAdd), as.character(round(n)))
  return(paste(returnVect, sep = "", collapse = ""))
}

Try the mutSignatures package in your browser

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

mutSignatures documentation built on May 30, 2017, 1:32 a.m.