powered by
v
l
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.
pad0
pad0()
padLast(v, ...)
vector padded to the correct length
the vector to pad by repeating the last element
arguments passed through to pad0
padLast(1:5, 7) # 5 is repeated twice padLast(1:5, 3) # no padding needed
Run the code above in your browser using DataLab