| 1 | 
| n | |
| m | |
| char | |
| na.value | 
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.
## The function is currently defined as
function (n, m, char = "0", na.value = NA) 
{
    max.zeros <- nchar(as.character(round(m)))
    tmp.digits <- nchar(as.character(round(n)))
    zeros.toAdd <- max.zeros - tmp.digits
    returnVect <- sapply(1:length(n), function(i) {
        if (zeros.toAdd[i] >= 0) {
            paste(c(rep(char, zeros.toAdd[i]), as.character(round(n[i]))), 
                sep = "", collapse = "")
        }
        else {
            na.value
        }
    })
    return(returnVect)
  }
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.