ensureVector {BBmisc} | R Documentation |
Blow up single scalars / objects to vectors / list by replication.
Description
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.
Usage
ensureVector(x, n = 1L, cl = NULL, names = NULL, ensure.list = FALSE)
Arguments
x |
[any] |
n |
[ |
cl |
[ |
names |
[ |
ensure.list |
[ |
Value
Ether a vector or list of length n
with replicated x
or x
unchanged..
[Package BBmisc version 1.13 Index]