right | R Documentation |
Simplified variant of 'substr' imitating the Excel & Alteryx 'RIGHT' function with an option to pad.
right(x, n = 4, pad = NULL)
x |
Vector to extract from. |
n |
Number of characters to extract starting from the right. |
pad |
Character to pad string values with (from the right) if the input vectors are less than n. |
Transformed vector of 'n' length.
right(c('Example', 'E.g.', 'Eg'),
n = 4,
pad = ' ')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.