load_data: Load donor data

Description Usage Arguments Value Examples

View source: R/load_data.R

Description

This function provides access to the built-in longitudinal data sets.

Usage

1
load_data(con = NULL, dnr, element = NULL, ids = NULL)

Arguments

con

A database connection. The default con = NULL reads the data from the internal data of the donorloader package.

dnr

Name of a dataset, e.g. "smocc" or "lollypop"

element

In case that dnr is a list, this is the name of the list element, e.g. "child" or "time". If NULL the function returns the full object.

ids

Vector with values from the id field in the data specified in the argument dnr. May be a vector. If omitted, all rows are returned. Setting ids to 0L or NULL returns a table with zero rows.

Value

A list, data frame or tibble with rows selected according to ids.

Examples

1
2
# first three ids from smocc
d <- load_data(dnr = "smocc", element = "child", ids = 10001:10003)

stefvanbuuren/donorloader documentation built on June 30, 2021, 12:15 a.m.