View source: R/miscellaneous.R
createPatientProfileVar | R Documentation |
Create a link to a patient profile directory
(where the patient profile files are saved) by adding an extra column with the link
in the data.
The path to the patient profile is built as:
[patientProfilePath]/subjectProfile-[subjectID].pdf,
where '/' are replaced with '-' in the subject
identifier (subjectVar
).
createPatientProfileVar(
data,
patientProfilePath,
subjectVar = "USUBJID",
checkExist = TRUE
)
data |
a data.frame |
patientProfilePath |
string indicating the directory where the patient profiles are stored. |
subjectVar |
string indicating which column in the data represents the unique subject identifier, "USUBJID" by default. |
checkExist |
Logical, if TRUE (by default)
the |
A data.frame with two extra columns:
patientProfilePath
and patientProfileLink
with
the path to the patient profile and an hyperlink to it, respectively.
Michela Pasetto
# Typical CDISC dataset contains universal subject ID (USUBJID)
data <- data.frame(USUBJID = c("subj1", "subj2", "subj3"))
dataWithPatientProfileVar <- createPatientProfileVar(
data = data,
patientProfilePath = "pathProfiles",
checkExist = FALSE
)
# path and HTML link are included in the output dataset
head(dataWithPatientProfileVar[, c("USUBJID", "patientProfilePath", "patientProfileLink")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.