Nothing
test_that("extraction of function body as character works", {
test_fun <- function(x) {
stopifnot(is.numeric(x))
{
x + 1
}
}
expect_equal(
function_body(test_fun),
"stopifnot(is.numeric(x)) { x + 1 }"
)
expect_equal(
function_body(test_fun, braces = TRUE),
"{ stopifnot(is.numeric(x)) { x + 1 } }"
)
expect_equal(
function_body(test_fun, nchar = 20),
"stopifnot(is.nume..."
)
})
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.