createPatChar | R Documentation |
Creates a patient characteristics table for a provided data.frame, as used by the plotForest and plotForestMV functions. Multiple observations per patient are indicated by the subject parameter, defaults to NULL. In this case, each row is considered an independent subject. If a subject vector is provided and if subjRef is set to "subject", the reference Value (100 number of rows is selected. If for any variable, no duplicate analysis makes sense (e.g. sex), the selected indices for this variable can be provided as names list via the subjVar parameter.
createPatChar(
data,
subject = NULL,
subjVar = NULL,
subjRef = NULL,
na.rm = T,
latex = T,
outdir = "../reports/",
filename = NULL,
fract = F
)
data |
data.frame containing the variables |
subject |
vecotr containing subject ids |
subjVar |
list conatining indices of which rows of data to used for any given variable (provided as name of the list element) |
na.rm |
remove na? |
latex |
create .tex files and/or compile it. |
outdir |
directory supplied to preparePdf(). Here, the tex and pdf files will be stored. |
filename |
filename of the pdf/tex file |
if latex is set to False, a data.frame with the patient characterisitcs. Otherwise, a list containing the patient characteristics table and information returned by the preparePdf() function (.tex filename, .pdf filename)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.