Description Usage Arguments Value Author(s) Examples
Increment a number possibly represented in a character string or factor
1 | Inc(n)
|
n |
A number, character string or factor |
The incremented value
Georges Monette
1 2 3 4 5 6 7 8 9 10 11 12 13 | ##---- 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 ) {
n <- as.character(n)
len <- nchar(n)
np1 <- as.numeric(n) + 1
np1c <- as.character(np1)
len <- max( len, nchar(np1c))
formatC( np1, flag = '0', width = len)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.