View source: R/report_defineIndex.R
defineIndex | R Documentation |
Define LaTeX index based on specified variable(s) of the dataset
defineIndex(subjects, data, var, subjectVar = "USUBJID", labelVars = NULL)
subjects |
vector with subject IDs (based on the |
data |
data.frame with data containing information on which the index should be based |
var |
variable(s) of |
subjectVar |
String, variable of |
labelVars |
Named character vector with variable labels (names are the variable code) |
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)
Laure Cougnaud
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.