resetEventIDsToDays: Convert event dates into relative days.

Description Usage Arguments Details Value Examples

Description

Set eventID relative to each person. eventID will be in days after the first observation date.

Usage

1

Arguments

event

a dataframe containing all events across all patients, see Details

Details

event contains events as rows and at least the following columns:

Relative days refer to the number of days since baseline. Baseline date is the earliest event observed in a patient.

eventID: number of days since first event (grouped by patient id) to the start date of event endEventID: number of days since first event (grouped by patient id) to the end date of event

Value

the event dataframe with additional columns: and added columns:

Examples

1
2
3
4
5
6
7
data("fake_data")
events <- fake_data$events
events$startdate <- as.Date(as.character(events$startdate), format='%Y-%m-%d')
events$enddate <- as.Date(as.character(events$enddate), format='%Y-%m-%d')

cleaned <- removeData(events)
cleaned <- resetEventIDsToDays(cleaned)

novasmedley/gbmSpm documentation built on May 17, 2019, 10:39 a.m.