Nothing
context("vectorized switch")
test_that("switchv works for strings", {
result <- switchv(c("horse", "fish", "cat", "bug"),
horse="fast",
cat="cute",
"what?")
expect_equal(result, c("fast", "what?", "cute", "what?"))
result <- switchv(c("horse", "fish", "cat", "bug"),
horse="fast",
cat="cute",
bug="ugly",
fish="wet")
expect_equal(result, c("fast", "wet", "cute", "ugly"))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.