Nothing
test_that("basic", {
expect_true(has_name(trees, "Volume"))
expect_false(has_name(mtcars, "gears"))
})
test_that("other types", {
expect_true(has_name(list(a = 1), "a"))
expect_true(has_name(c(a = 1), "a"))
})
test_that("vectorized", {
expect_equal(has_name(list(a = 1), letters), c(TRUE, rep(FALSE, 25)))
})
test_that("NA", {
expect_false(has_name(list(a = 1), NA))
})
test_that("unnamed", {
expect_false(has_name(1, "a"))
expect_true(has_name(1, ""))
})
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.