add_incidence: Add an incidence of disease/disorder column to the dataset.

Description Usage Arguments Value Examples

Description

Input must be long format with subject id (SID), visit number (VN), and the column(s) to determine the incidence.

Usage

1
add_incidence(.data, .variables, prefix = NULL)

Arguments

.data

Dataset with SID, VN, and the variable(s) of interest.

.variables

Columns to apply the function to.

prefix

Add a prefix to the variable column names.

Value

Wide dataset with time across the top and various disease/disorder statuses below.

Examples

1
2
3
4
5
example_data %>%
add_incidence("DM")

example_data %>%
add_incidence("DM", prefix = "Incid_")

lwjohnst86/PROMISE.desc documentation built on May 15, 2019, 5:03 a.m.