Learn R Programming

NBDCtools (version 1.0.2)

get_levels: Get levels table

Description

Retrieves levels table for a given study and release version. Allows for filtering by variables and tables. Wrapper around get_metadata().

In addition to the main get_levels() function, there are two study-specific variations:

  • get_levels_abcd(): for the ABCD study.

  • get_levels_hbcd(): for the HBCD study.

They have the same arguments as the get_levels() function, except that the study argument is set to the respective study by default, and should not be set by the user.

Usage

get_levels(study, release = "latest", vars = NULL, tables = NULL)

get_levels_abcd(...)

get_levels_hbcd(...)

Value

Data frame with the levels table.

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.

...

Additional arguments passed to the underlying get_levels() function.

Examples

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

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

get_levels("abcd", vars = c("ab_g_dyn__visit_type"))

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

get_levels_abcd(release = "6.0")

get_levels_hbcd()
}

Run the code above in your browser using DataLab