padLast {LifeInsureR}R Documentation

Pad the vector v to length l by repeating the last entry of the vector.

Description

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.

Usage

padLast(v, ...)

Arguments

v

the vector to pad by repeating the last element

...

arguments passed through to pad0

Value

vector padded to the correct length

Examples

padLast(1:5, 7) # 5 is repeated twice
padLast(1:5, 3) # no padding needed


[Package LifeInsureR version 1.0.0 Index]