Quick and dirty helper during development, to check all the attributes of all the data files in relevant packages. It loads unloaded packages as needed, which you might not want it to do, but it is not coded to be able to check attributes without doing that.
Usage
metadata_check(
packages = EJAM::ejampackages,
datasets = "all",
which = c("date_saved_in_package", "date_downloaded", "ejscreen_version",
"ejscreen_releasedate", "acs_releasedate", "acs_version", "census_version"),
grepdatasets = FALSE,
loadifnotloaded = TRUE
)
Arguments
- packages
Optional. e.g. 'EJAMejscreendata', or can be a vector of character strings, and if not specified, default is to report on EJAM::ejampackages. If set to NULL, it only reports on objects already attached.
- datasets
optional, "all" means all data objects exported. Can be a vector of character names of the ones to check like c("bgpts", "blockpoints")
- which
Optional vector (not list) of strings, the attributes. Default is some typical ones used in EJAM-related packages currently.
- grepdatasets
optional, if set to TRUE, datasets should be a query to use via grep to identify which datasets to check. It always uses ignore.case=TRUE for this.
- loadifnotloaded
Optional to control if func should temporarily attach packages not already loaded.
Examples
# tail(metadata_check( ))
metadata_check(packages = NULL)
#> Error in metadata_check(packages = NULL): could not find function "metadata_check"
x <- metadata_check("EJAM")
#> Error in metadata_check("EJAM"): could not find function "metadata_check"
x[x$has_metadata == TRUE, ]
#> Error: object 'x' not found
table(x$has_metadata)
#> Error: object 'x' not found