library(stash)
test_that("stash() works", {
mtc_stash <- stash(mtcars)
print(mtc_stash)
expect_true(is_stash_ref(mtc_stash))
expect_false(mtc_stash$has_content())
expect_identical(mtc_stash[], mtcars)
mtc_stash$load_content()
expect_true(mtc_stash$has_content())
expect_identical(mtc_stash[], mtcars)
mtc_stash$remove_content()
expect_false(mtc_stash$has_content())
mtc_stash$remove_stash()
expect_false(mtc_stash$has_stash_file())
expect_error(mtc_stash[])
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.