Nothing
test_that("usedf links active data to a visible object", {
patient <- data.frame(age = c(20, 30, 40), sex = c(1, 2, 1))
usedf(patient, quiet = TRUE)
genvar(age2 = age^2)
expect_true("age2" %in% names(patient))
expect_equal(patient$age2, patient$age^2)
patient$age[1] <- 21
expect_equal(usedf(quiet = TRUE)$age[1], 21)
usedf(clear = TRUE, quiet = TRUE)
})
test_that("an expression creates an unlinked active copy", {
patient <- data.frame(age = c(20, 30, 40))
usedf(subset(patient, age >= 30), quiet = TRUE)
genvar(age2 = age^2)
expect_false("age2" %in% names(patient))
expect_true("age2" %in% names(usedf(quiet = TRUE)))
usedf(clear = TRUE, quiet = TRUE)
})
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.