Learn R Programming

gsearly (version 1.0.0)

dataOrder: Order a data frame by subject and ordered time variable

Description

Orders a user supplied data frame by subject and ordered time variable.

Usage

dataOrder(data, datanames=c("id","atime","catime",
                                            "intervention","outcome"))

Value

Returns an ordered data frame.

Arguments

data

A data frame structured as those from function simdataExtract.

datanames

Names of the five required data variables; participant identifier, time-point, standardized (continuous) time-point (see tfuStandard), intervention arm and outcome, in that order; e.g. c("id","atime","catime","intervention","outcome")).

Examples

Run this code
 data(qol)
 oqol <- dataOrder(qol,datanames=c("Subject","Weeks","STime","Treat","QoL"))
 head(qol, n=50)

Run the code above in your browser using DataLab