Skip to contents

Returns metadata of a selected type from an ev_data container.

Usage

get_ev_metadata(ev_data, type = character(0))

Arguments

ev_data

An ev_data container

type

One of c('variable', 'category', 'table'). If not recognised, returns an empty data frame.

Value

A data frame of metadata

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

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")

} # }