fn rep_vector(
v: &Vector,
each: usize,
times: usize,
length_out: Option<i64>,
) -> Result<Vector, RError>Expand description
Helper: replicate a vector with each, times, and optional length.out.
Algorithm: first apply each (repeat each element), then apply times
(repeat the whole result), then truncate/extend to length.out if given.