Nothing
test_that("major user-facing functions remain exported", {
ex <- getNamespaceExports("R4VN")
expect_true(all(c("tabsurv", "tabscore", "tabmachine") %in% ex))
})
test_that("minimal tabscore example remains executable", {
set.seed(2026)
n <- 80
d <- data.frame(
age = round(rnorm(n, 52, 12)),
hypertension = factor(rbinom(n, 1, .30), 0:1, c("No", "Yes")),
smoking = factor(rbinom(n, 1, .25), 0:1, c("No", "Yes"))
)
d$event <- rbinom(n, 1, plogis(-3.5 + .04*d$age +
.8*(d$hypertension == "Yes") + .6*(d$smoking == "Yes")))
expect_no_error({
s <- tabscore(
event, c(age, hypertension, smoking), data = d,
cuts = list(age = c(40, 55, 70)),
validate = "none", show = FALSE
)
})
expect_s3_class(s, "r4vn_tabscore")
})
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.