Get single metadata table
get_ev_metadata.Rd
Returns metadata of a selected type from an ev_data
container.
Usage
get_ev_metadata(ev_data, type = character(0))
Details
Three types of metadata can be returned:
- variable
Variable level information such as name, label, description, keywords and summary stats.
- category
Value labels for categorical variables, one row per value. Returns variable name, value and label.
- table
Table level information such as name, cohort membership, entity type, subjects and respondents and table description.
An ev_data
container can be created using fetch_ev_data
.
See also
fetch_ev_data
to create an ev_data
container.
Other getters:
get_ev_data_names()
,
get_ev_data()
,
get_ev_projects()
,
get_ev_request()
,
get_ev_tables()
,
get_ev_variables()
,
get_ev_vars_df()
Examples
if (FALSE) { # \dontrun{
con <- ev_connect()
# read a variable data request file
vars <- read_ev_variables("path/to/variables/file")
# fetch the data from EpiVault
dat <- fetch_ev_data(con, vars)
# get variable metadata
get_ev_metadata(dat, type = "variable")
# get category metadata
get_ev_metadata(dat, type = "category")
# get table metadata
get_ev_metadata(dat, type = "table")
} # }