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

View source: R/report_defineIndex.R

defineIndexR Documentation

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)

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)

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)

Author(s)

Laure Cougnaud


patientProfilesVis documentation built on Nov. 18, 2022, 5:12 p.m.