evenInsert A function to insert m elements evenly into a length n vector.
Source:R/insertEven.R
evenInsert.Rd
evenInsert A function to insert m elements evenly into a length n vector.
Arguments
- m
A numeric vector of length less than or equal to n. The elements to be inserted.
- n
A numeric vector. The vector into which the elements of m will be inserted.
- verbose
logical If TRUE, prints additional information. Default is FALSE.
Details
The function takes two vectors, m and n, and inserts the elements of m evenly into n. If the length of m is greater than the length of n, the vectors are swapped, and the insertion proceeds. The resulting vector is a combination of m and n, with the elements of m evenly distributed within n.
See also
SimPed
for the main function that uses this supporting function.