Learn R Programming

dostats (version 1.2.0)

fill_v: Fill vector to length with a specified value

Description

Extend a vector to the desired length by appending/inserting with at after, repeating with as necessary.

Usage

fill_v(x, l = length(x), with = last(x),
    after = length(x))

Arguments

x
a vector
l
the length desired
with
the item to append to achieve the desired length
after
where to insert the items.