View source: R/HelperFunctions.R
padLast | R Documentation |
v
to length l
by repeating the last entry of the
vector.This function is just a trivial wrapper around pad0
and only calls pad0()
with the last element of the vector as padding value instead of the default 0.
padLast(v, ...)
v |
the vector to pad by repeating the last element |
... |
arguments passed through to |
vector padded to the correct length
padLast(1:5, 7) # 5 is repeated twice
padLast(1:5, 3) # no padding needed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.