numerate | R Documentation |
This function generates a sequence of numbers between two specified values, optionally padding them with leading zeros to a specified length. It is useful for creating numeric sequences with consistent character lengths.
numerate(
x = 1,
y = 100,
zeropadding = TRUE,
pad_length = floor(log10(max(abs(x), abs(y)))) + 1
)
x |
The starting number of the sequence. Default: 1. |
y |
The ending number of the sequence. Default: 100. |
zeropadding |
Logical; whether to pad numbers with zeros. Default: TRUE. |
pad_length |
The length of padding for the numbers. Default: Calculated as floor(log10(max(abs(x), abs(y)))) + 1. |
A vector of formatted numbers, with or without zero padding.
str_pad
numerate(1, 122)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.