Survey_WHO2007 <- read.csv("data-raw/Survey_WHO2007.csv", stringsAsFactors = FALSE)
Survey_WHO2007$dob <- lubridate::dmy(Survey_WHO2007$dob)
Survey_WHO2007$dov <- lubridate::dmy(Survey_WHO2007$dov)
with(Survey_WHO2007, {
stopifnot(is.integer(strata))
stopifnot(is.integer(cluster))
stopifnot(is.integer(id))
stopifnot(lubridate::is.Date(dob))
stopifnot(lubridate::is.Date(dov))
stopifnot(is.numeric(agemons), all(agemons >= 60))
stopifnot(is.numeric(weight), all(weight >= 0, na.rm = TRUE))
stopifnot(is.numeric(height), all(height >= 0, na.rm = TRUE))
stopifnot(is.numeric(sw), all(sw >= 0))
stopifnot(is.character(oedema), all(oedema %in% c("n", "y")))
stopifnot(is.character(region), all(region %in% c("North", "West", "East", "South")))
})
usethis::use_data(Survey_WHO2007, overwrite = TRUE, version = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.