Nothing
test_that("fillup carries values backward within groups", {
data <- data.frame(
id = c(1, 1, 1, 2, 2),
visit = c(1, 2, 3, 1, 2),
treatment = c("A", NA, NA, NA, "B")
)
out <- fillup(data, cols = "treatment", by = "id")
expect_s3_class(out, "basetable")
expect_equal(out$treatment, c("A", NA, NA, "B", "B"))
})
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.