Nothing
test_that("lazy database operations retain IDs and column metadata", {
database <- biogeme_database(
"operations",
data.frame(ID = c(1, 1, 2), x = c(1, 2, 3), row.names = c("a", "b", "c"))
)
database <- biogeme_database_define_variable(database, "x2", variable("x") * 2)
database <- biogeme_database_remove(database, variable("x") == 2)
expect_equal(biogeme_database_row_ids(database), c("a", "b", "c"))
expect_equal(biogeme_database_columns(database), c("ID", "x", "x2"))
expect_true(is.na(biogeme_database_filtered_row_count(database)))
expect_true(is.na(biogeme_database_nrow(database)))
})
test_that("panel declarations enforce contiguous observation blocks", {
database <- biogeme_panel_database(
"panel",
data.frame(ID = c(1, 1, 2, 2), x = 1:4),
"ID"
)
expect_true(biogeme_database_is_panel(database))
expect_error(
biogeme_panel_database("bad_panel", data.frame(ID = c(1, 2, 1), x = 1:3), "ID"),
"contiguously"
)
})
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.