Blow up single scalars / objects to vectors / list by replication.
Useful for standard argument conversion where a user can input a single element, but this has to be replicated now n times for a resulting vector or list.
ensureVector(x, n = 1L, cl = NULL, names = NULL, ensure.list = FALSE)
x |
[any] |
n |
[ |
cl |
[ |
names |
[ |
ensure.list |
[ |
Ether a vector or list of length n
with replicated x
or x
unchanged..
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.