R/utils.R
to_n.Rd
Replicate entries of a vector if required.
to_n(x, n)
(numeric) vector of numbers we want to analyze.
numeric
(integer(1)) number of entries that are needed.
integer(1)
x if it has the required length already or is NULL, otherwise if it is scalar the replicated version of it with n entries.
x
NULL
n
This function will fail if x is not of length n and/or is not a scalar.