Description Usage Arguments Value Author(s) See Also Examples
Add a leading character to equalize string lengths
1 | lead_char(x, padChar = "0", padExtra = 0)
|
x |
Vector of character, numeric, or factor values to pad. Will be converted immediately to a character vector. |
padChar |
character to add to the front of values of 'x'. Should be of length 1, or unexpected behavior may result. |
padExtra |
nonnegative integer of how many extra padChar characters to add to the front of values of 'x'. |
character string
Bill Forrest forrest@gene.com
1 2 3 | lead_char( 1:10 )
lead_char( 1:10, padChar = '_' )
data.frame( animal = lead_char( c('cat','alligator', 'heron'), padChar = '_' ) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.