R/utils-basic.R

broadcast_vector.Rd

broadcast the vector into length n

broadcast_vector(x, n)

vector

target length

broadcast_vector(1:3, 5) #> [1] 1 2 3 1 2