Pulls the last n dates from a vector

add_dates(dates, n)

Arguments

dates

Character vector of dates to pull from.

n

Number of dates required

Value

Character vector of dates of length N

Examples

dates <- rep(1:10) add_dates(dates, 3)
#> [1] 8 9 10