R/xgx_auto_explore.R
xgx_auto_explore.Rd
xgx_auto_explore
returns an HTML and PDF document with plots
describing the provided dataset
xgx_auto_explore(
data_path = NULL,
mapping = list(),
author_name = NULL,
multiple_dosing = FALSE,
pk_cmt = NULL,
pd_cmt = NULL,
pd_data_type = NULL,
dose_cmt = NULL,
steady_state_day = NULL,
time_between_doses = NULL,
rmd_template_name = NULL,
rmd_template_path = NULL,
rmd_output_path = NULL,
pdf_output_path = NULL,
html_output_path = NULL,
add_datetime = TRUE,
show_explanation = TRUE
)
Path (as a string) to the dataset that is to be analyzed
A list of column name mappings from the original (template) dataset column names to the corresponding columns in the new dataset.
The name of the author to be displayed on the template
Whether or not to use a "Multiple" or "Single" Ascending dose template
An integer denoting the "compartment" containing the PK data. The "CMT" column will typically have these integers, where each row may contain PK, PD, dosing or other events/observations data
An integer denoting the "compartment" containing the PD data, of the desired type (continuous, ordinal, etc.). The "CMT" column will typically have these integers, where each row may contain PK, PD, dosing or other events/observations data
The type of PD data - acceptable values exist in the following list: ["binary","continuous","count","ordinal","real_example","receptor_occupancy","time_to_event"]
Integer denoting the compartment for dosing records
used to denote the day of rich sampling of PK at steady state
dosing interval, has units to match the time variable of the dataset
A custom output name for the generated Rmd file
A user provided custom template (as a string)
A custom output path for the generated Rmd file (This is typically left as `NULL` in order to maintain the hierarchical directory structure of `xgx_autoexplore_output`))
A custom output path for the generated PDF file (This is typically left as `NULL` in order to maintain the hierarchical directory structure of `xgx_autoexplore_output`))
A custom output path for the generated HTML file (This is typically left as `NULL` in order to maintain the hierarchical directory structure of `xgx_autoexplore_output`))
Boolean indicating additon of a date stamp to the beginnning of the Rmd file
Boolean indicating if the additional explanations (text in between figures) are needed for the user.
This function can be used quickly to explore your data by generating overview plots before constructing non-linear mixed effects models.
author_name = "Your Name Here"
show_explanation = FALSE
if (FALSE) {
# Try out the nonlinear_pkpd dataset with the
# Multiple Ascending Dose PK Rmd template
data_path <- "~/nonlinear_pkpd.csv"
# Specify the mapping of column names
mapping <- list(
"TIME" = "TIM2",
"NOMTIME" = "NT",
"EVID" = 0,
"CENS" = 0,
"DOSE" = "MGKG",
"TRTACT" = "TRT",
"LIDV_NORM" = "LIDV/MGKG",
"LIDV_UNIT" = "UNIT",
"PROFDAY" = 1,
"SEX" = 0,
"WEIGHTB" = 0)
# 5 contains the PK Concentration in this dataset
pk_cmt = 5
# We don't need PD right now
pd_cmt = NULL
pd_data_type = NULL
dose_cmt = 1
steady_state_day = c(0, 6)
time_between_doses = 24
multiple_dosing = TRUE
output_directory = tempdir()
xgx_auto_explore(data_path = data_path,
mapping = mapping,
author_name = author_name,
pk_cmt = pk_cmt,
pd_cmt = pd_cmt,
dose_cmt = dose_cmt,
steady_state_day = steady_state_day,
time_between_doses = time_between_doses,
multiple_dosing = multiple_dosing,
pd_data_type = pd_data_type,
rmd_output_path = output_directory,
show_explanation = show_explanation)
}