Learn R Programming

patientProfilesVis (version 2.0.8)

defineIndex: Define LaTeX index based on specified variable(s) of the dataset

Description

Define LaTeX index based on specified variable(s) of the dataset

Usage

defineIndex(subjects, data, var, subjectVar = "USUBJID", labelVars = NULL)

Value

list with elements:

  • 'indexDef': string with LaTeX code for creation of index, to be included directly with cat in a knitr document (two backslashes)

  • 'indexInfo': character vector, named with named with subject ID, containing LaTeX code for index for each subject specified in subjects parameter, to be passed to the knit function as text (four backslashes)

  • 'indexPrint': string with LaTeX code for printing/inclusion of index, to be included directly with cat in a knitr document (two backslashes)

Arguments

subjects

vector with subject IDs (based on the subjectVar variable)

data

data.frame with data containing information on which the index should be based

var

variable(s) of data of interest for the index

subjectVar

String, variable of data with subject ID

labelVars

Named character vector with variable labels (names are the variable code)

Author

Laure Cougnaud