Learn R Programming

NBDCtools (version 1.0.2)

get_metadata: Get metadata

Description

Retrieves metadata (data dictionary, levels table, event map) for a given study and release version. Allows for filtering by variables and tables.

Usage

get_metadata(
  study,
  release = "latest",
  vars = NULL,
  tables = NULL,
  type = "dd"
)

Value

Data frame with the metadata.

Arguments

study

character. The study name. One of "abcd" or "hbcd".

release

character. Release version (Default: "latest").

vars

character (vector). Vector with the names of variables to be included.

tables

character (vector). Vector with the names of tables to be included.

type

character. Type of metadata to retrieve. One of "dd", "levels", "sessions" (Default: "dd").

Examples

Run this code
if (FALSE) { # requireNamespace("NBDCtoolsData", quietly = TRUE)
get_metadata("abcd", type = "levels")

get_metadata("hbcd", release = "1.0")

get_metadata("abcd", vars = c("ab_g_dyn__visit_dtt", "ab_g_dyn__visit_age"))

get_metadata("abcd", tables = "ab_g_dyn")

get_metadata("abcd", tables = "ab_g_dyn")

get_metadata("abcd", type = "sessions")
}

Run the code above in your browser using DataLab