to.long: A Wide to Long Data Set Function

View source: R/to.long.R

to.longR Documentation

A Wide to Long Data Set Function

Description

This function helps you convert a wide time-series data set (with one row for each patient and multiple columns for each different time points), to a long time-series data set (with t rows for each patient where t=number of time poitns).

Usage

to.long(data, id_column, time_columns, date_columns)

Arguments

data

enter data set containing month values.

id_column

enter the column containing patient IDs (str)

time_columns

enter the time-varying outcome variable columns

date_columns

enter the time-indicating month-formatted columns (str)

Examples

to.long()

noahlorinczcomi/sgmm documentation built on Aug. 23, 2023, 1:28 a.m.