test_that("Check that key fields exist by name", {
expect_true("region_name" %in% colnames(regional_curve))
expect_true("state" %in% colnames(regional_curve))
expect_true("dimension" %in% colnames(regional_curve))
expect_true("intercept" %in% colnames(regional_curve))
expect_true("slope" %in% colnames(regional_curve))
expect_true("r_squared" %in% colnames(regional_curve))
expect_true("no_sites" %in% colnames(regional_curve))
expect_true("drainage_area_range" %in% colnames(regional_curve))
expect_true("recurrence_range" %in% colnames(regional_curve))
expect_true("median_recurrence" %in% colnames(regional_curve))
expect_true("reference" %in% colnames(regional_curve))
})
test_that("Check that key fields are of the correct data type", {
expect_true(is.factor(regional_curve$region_name))
expect_true(is.character(regional_curve$state))
expect_true(is.factor(regional_curve$dimension))
expect_true(is.numeric(regional_curve$intercept))
expect_true(is.numeric(regional_curve$slope))
expect_true(is.numeric(regional_curve$r_squared))
expect_true(is.numeric(regional_curve$no_sites))
expect_true(is.character(regional_curve$drainage_area_range))
expect_true(is.character(regional_curve$recurrence_range))
expect_true(is.character(regional_curve$median_recurrence))
expect_true(is.character(regional_curve$reference))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.