View source: R/extractForestData.R
extractForestData | R Documentation |
extractForestData
automatically extracts data for generating forest
plots from Simulator output files and formats them for use with
forest_plot
or the forest plot shiny app. This will take some
time to run since it needs to open multiple Excel files. For detailed
instructions and examples, please see the SharePoint file "Simcyp PBPKConsult
R Files - Simcyp PBPKConsult R Files/SimcypConsultancy function examples and
instructions/Forest plots/Examples-for-making-forest-plots.docx". (Sorry, we
are unable to include a link to it here.)
extractForestData(
sim_data_files = NA,
PKparameters = c("AUCinf_ratio_dose1", "AUCt_ratio_dose1", "Cmax_ratio_dose1",
"AUCtau_ratio_last", "Cmax_ratio_last"),
compoundToExtract = "substrate",
tissue = "plasma",
existing_exp_details = NA,
sheet = NA,
checkDataSource = TRUE,
save_output = NA
)
sim_data_files |
a character vector of simulator output files, each in
quotes and encapsulated with |
PKparameters |
PK parameters to extract from simulator output files; default is all possible AUC and Cmax geometric mean ratios for both dose 1 and the last dose simulated. Input must be among "AUCinf_ratio_dose1", "AUCt_ratio_dose1", "Cmax_ratio_dose1", "AUCtau_ratio_last", or "Cmax_ratio_last". List them in the order you'd like the columns to appear in the output. |
compoundToExtract |
For which compound do you want to extract PK data? Options are:
|
tissue |
For which tissue would you like the PK parameters to be pulled? Options are "plasma" (default), "unbound plasma", "blood", or "unbound blood". |
existing_exp_details |
If you have already run
|
sheet |
optionally specify the name of the sheet where you'd like to pull the PK data, in quotes; for example, specify the tab where you have a user-defined AUC integration. Note: Unless you want a very specific Excel sheet that's not what the usual sheet name would be for a first or last dose, this function will work best if this is left as NA. Also, since we don't know which dose these data were for, you'll see that the output parameter names do not include the suffixes "_last" or "_dose1". |
checkDataSource |
TRUE (default) or FALSE: Include in the output a data.frame that lists exactly where the data were pulled from the simulator output file. Useful for QCing. |
save_output |
optionally save the output by supplying a file name in quotes here, e.g., "My forest graph data.csv". If you leave off ".csv", it will still be saved as a csv file. |
a data.frame of data to use for making forest plots
extractForestData(sim_data_files = NA,
save_output = "Forest data.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.