pad_integers | R Documentation |
Takes in a numeric vector of integerish values and returns a character vector of the same length with padding. The width of padding can be specified or intuited from the maximum value. The padding flag can be configured.
pad_integers(x, width = NULL, flag = "0")
x |
A numeric vector of integerish values (i.e., either R integers or
integer-like doubles). See |
width |
Either NULL or a single integerish value specifying the width of
padding to use. If NULL, the width of the maximum value in |
flag |
A string specifying what to pad |
A character vector the same length as x
but with padding
added with the specifying width and flag.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.