Description Usage Arguments Value
Recycle a vector using names and smart rules
1 | recycle_better(vec, vecnames, default = 0)
|
vec |
A numeric vector used for recycling. If the vector is not named, then it is simply recycled N times where N = length(vecnames). If it is a named numeric, then a vector of length N is built using the default argument below, then those named values are inserted in the result. |
vecnames |
The ordered names to assign to the results. |
default |
The default value to pad the vector with when a named vec argument is provided. |
Returns a vector of length(vecnames) that is named and ordered as vecnames.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.