View source: R/check_dataset.R
check_dataset | R Documentation |
Run a test suite of checks to test whether a data.frame
or tibble
conforms to Darwin Core Standard.
While most users will only want to call suggest_workflow()
,
the underlying check functions are exported for detailed work, or for
debugging. This function is useful for users experienced with
Darwin Core Standard or for final dataset checks.
check_dataset(.df)
.df |
A tibble against which checks should be run |
check_dataset()
is modelled after devtools::test()
. It runs a
series of checks, then supplies a summary of passed/failed checks and
error messages.
Checks run by check_dataset()
are the same that would
be run automatically by various set_
functions in a piped workflow. This
function allows users with only minor expected updates to check their entire
dataset without the need for set_
functions.
Invisibly returns the input data frame, but primarily called for the side-effect of running check functions on that input.
df <- tibble::tibble(
scientificName = c("Crinia Signifera", "Crinia Signifera", "Litoria peronii"),
latitude = c(-35.27, -35.24, -35.83),
longitude = c(149.33, 149.34, 149.34),
eventDate = c("2010-10-14", "2010-10-14", "2010-10-14"),
status = c("present", "present", "present")
)
# Run a test suite of checks for Darwin Core Standard conformance
# Checks are only run on columns with names that match Darwin Core terms
df |>
check_dataset()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.