switchv | R Documentation |
Vectorized version of switch
switchv(EXPR, ...)
EXPR |
An expression evaluating to a vector of numbers of strings |
... |
List of alternatives |
Vectorized version of base::switch()
: just loops over
input and calls base::switch()
.
Vector of returned values.
Karl Broman
switchv(c("horse", "fish", "cat", "bug"), horse = "fast", cat = "cute", "what?" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.