View source: R/extractConcTime_mult.R
extractConcTime_mult | R Documentation |
extractConcTime_mult
is meant to be used in conjunction with
ct_plot_overlay
or ct_plot_mult
to create graphs
from multiple Simcyp Simulator output files. If you list multiple files,
multiple tissues, and/or multiple compounds to extract (see options below),
this will extract all possible variations of them. For example, if you
ask for data from the files "sim1.xlsx" and "sim2.xlsx" and then also ask for
"substrate" and "primary metabolite 1", you will get the substrate and
primary metabolite 1 data from both files. NOTE: If ANY of
the Excel files you wish to extract data from are open, this WILL CRASH and
WILL NOT save whatever progress it has made so far. Be sure to close all of
the source Excel files.
extractConcTime_mult(
sim_data_files = NA,
obs_to_sim_assignment = NA,
ct_dataframe = NA,
overwrite = FALSE,
tissues = "plasma",
compoundsToExtract = "all",
conc_units_to_use = "ng/mL",
time_units_to_use = "hours",
returnAggregateOrIndiv = "aggregate",
adjust_obs_time = FALSE,
existing_exp_details = NA,
obs_data_files = NA,
...
)
sim_data_files |
a character vector of simulator output files, each in
quotes and encapsulated with |
obs_to_sim_assignment |
the assignment of which observed files go with which simulated files. (NA, which is the default, means no observed data will be extracted.) There are four ways to supply this:
For whichever option you choose, the observed files' paths should be included if they are located somewhere other than your working directory. The observed data files should be for the Excel file that it is ready to be converted to an XML file, not the file that contains only the digitized time and concentration data. This function assumes that the dosing intervals for the observed data match those in the simulated data. See "Details" for more info. |
ct_dataframe |
(optional) a data.frame that contains previously
extracted concentration-time data. This should NOT be in quotes. Because we
can see scenarios where you might want to extract some concentration-time
data, play around with those data, and then later decide you want to pull
more concentration-time data for comparisons, this data.frame can already
exist. When that is the case, this function will add data to that
data.frame. It will not overwrite existing data unless
|
overwrite |
TRUE or FALSE (default) on whether to re-extract the
concentration-time data from output files that are already included in
|
tissues |
From which tissue(s) should the desired concentrations be extracted? Default is plasma for typical plasma concentration-time data. Other options are "blood" or any tissues included in "Sheet Options", "Tissues" in the simulator. All possible options:
Not case sensitive. Acceptable
input is all tissues desired as a character vector, e.g., |
compoundsToExtract |
For which compound do you want to extract concentration-time data? Options are:
Input to this argument
should be all desired compounds as a character vector, e.g.,
|
conc_units_to_use |
concentration units to use so that all data will be comparable. Options are the same as the ones in the Excel form for PE data entry. Default is "ng/mL". Note: ADAM model data concentration units are not converted because there are simply too many units to manage easily, so please check that the units are what you expected in the end. |
time_units_to_use |
time units to use so that all data will be comparable. Options are "hours" (default), "days", "weeks", or "minutes". |
returnAggregateOrIndiv |
Return aggregate and/or individual simulated concentration-time data? Options are "aggregate" (default), "individual", or "both". Aggregated data are not calculated here but are pulled from the simulator output rows labeled as "Population Statistics". |
adjust_obs_time |
TRUE or FALSE (default) for whether to adjust the time listed in the observed data file to match the last dose administered. This only applies to multiple-dosing regimens. If TRUE, the graph will show the observed data overlaid with the simulated data such that the dose in the observed data was administered at the same time as the last dose in the simulated data. If FALSE, the observed data will start at whatever times are listed in the Excel file. |
existing_exp_details |
If you have already run
|
obs_data_files |
TO BE DEPRECATED. This is the same argument as obs_to_sim_assignment; we just renamed it to try to be clearer about what the argument does and in what order you should list the files. |
... |
other arguments passed to the function
|
Regarding dose intervals for observed data: The observed data files don't include information on dosing intervals or dose numbers, which makes it a little tricky to figure out which dose number a given time in an observed data file should have. If the compound IDs in the simulated data match those in the observed data, we will assume that the dosing intervals are the same. This was coded with the assumption that the dosing interval would be a round number (subjects aren't getting dosed on the half hour, for example), so if that's not the case, these dose number assignments will be off.
Returns a large data.frame with multiple sets of concentration-time
data, formatted the same way as output from the function
extractConcTime
ConcTimeData <-
extractConcTime_mult(
sim_data_files = c("MyFile1.xlsx", "MyFile2.xlsx"),
ct_dataframe = ConcTimeData,
overwrite = FALSE,
tissues = "unbound plasma")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.