test_that("Testing the vessel stats function", {
# Fake datasets
data("marine_stats")
marine_stats <- marine_stats[marine_stats$vessel_id == 1960, ]
# It is fine
expect_equal(is.null(vessel_stats(marine_stats = marine_stats)), FALSE)
# It is also fine (i don't use the id)
marine_stats$vessel_id <- NULL
expect_equal(is.null(vessel_stats(marine_stats = marine_stats)), FALSE)
# It is a problem because the output will be empty, However it does not break the code.
marine_stats$vessel_name <- NULL
expect_warning(vessel_stats(marine_stats = marine_stats))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.