View source: R/format_obs_for_XML.R
format_obs_for_XML | R Documentation |
format_obs_for_XML
will convert generic observed concentration-time
data into a format that works for pasting into the Simcyp Simulator PE data
template, which is then used to generate an observed data overlay XML file.
This should be used with one study cohort at at time, e.g., only one dose
level and one dosing regimen.
format_obs_for_XML(
obs_dataframe,
subject_column,
DVID_column,
time_column,
conc_column,
conc_sd_column,
dose = 100,
dose_unit = "mg",
inf_duration = NA,
dosing_start_time = 0,
set_t0_concs_to_0 = TRUE,
missing_value_treatment = "as is",
dose_route = "Oral",
dose_interval = NA,
num_doses = NA,
end_time = NA,
custom_dosing_schedule = NA,
simulator_version = 22,
compoundID = "Substrate",
demog_dataframe,
age_column,
weight_column,
height_column,
sex_column,
save_output = NA,
return_data = FALSE
)
obs_dataframe |
observed concentration-time data.frame |
subject_column |
the column in the observed concentration-time data.frame and in the optional demographic data.frame that contains the subject ID. Note that this means that the subject ID column in the concentration-time data.frame and in the demographic data.frame must match. |
DVID_column |
the column in the observed concentration-time data.frame
that indicates any time the DV number in the PE file should change. It's
fine to omit this if everything should be "1". If you haven't already
created a column for this with "1", "2", or "3" as the values for the DVID,
you can specify which column you want to use and we'll assign the numbers
for you. For example, if you have some data in plasma and some in blood and
have a column called "Tissue", you'd set this as |
time_column |
the column in the observed concentration-time data.frame that contains time data |
conc_column |
the column in the observed concentration-time data.frame that contains concentration data |
conc_sd_column |
the column in the observed concentration-time data.frame that contains the standard deviation of the concentration (optional). This will be mapped to the column "SD SE" in the PE data template file. This only applies for Simcyp Simulator versions >= 22 and also obviously only applies if you have reported mean concentrations for the dependent variable. |
dose |
the amount of the dose. If this amount varies, please include one
dose amount for each time. For example: |
dose_unit |
the unit of dosing. Options are "mg" (default), "mg/m2", or "mg/kg". |
inf_duration |
the infusion duration (min) (optional) |
dosing_start_time |
the start time of compound administration (h); default is 0. |
set_t0_concs_to_0 |
TRUE (default) or FALSE for whether to set any concentrations at t0 for the 1st dose to 0. |
missing_value_treatment |
How should missing values be dealt with? The Simcyp PE template will not allow any missing values for concentrations, so they will be removed from the data automatically. Options for dealing with missing values:
If you set |
dose_route |
the route of administration. Options are "Oral" (default), "Intravenous", "Dermal", "Inhaled", "SC-First Order", "SC-Mechanistic", or "Auto-detect". Not case sensitive. |
dose_interval |
the dosing interval in hours. Default is NA for a single dose. Set this to, e.g., 24 for a QD dosing regimen. |
num_doses |
the number of doses to generate. If this is left as NA and
you have specified the dose interval, then the value for |
end_time |
the end time of the study in hours. If |
custom_dosing_schedule |
a custom dosing schedule to be used for each
subject in hours, e.g., |
simulator_version |
the version of the simulator that will be used. This affects what columns will be included in the output. |
compoundID |
specify the compound that's being dosed. Options are
"Substrate" (default), "Inhibitor 1", "Inhibitor 2", or "Inhibitor 3". Not
case sensitive. If you list more than one compound, you must also list more
than one |
demog_dataframe |
a data.frame of demographic information (optional) |
age_column |
the column in demog_dataframe that contains age data |
weight_column |
the column in demog_dataframe that contains weight data |
height_column |
the column in demog_dataframe that contains height data |
sex_column |
the column in demog_dataframe that contains sex data |
save_output |
the file name to use for saving the output as a csv; if left as NA, this will generate a data.frame in R but no output will be saved. |
return_data |
TRUE or FALSE (default) for whether to return a data.frame of the output at the end. If you're only using this to save csv files to convert into XML overlay files, you probably don't need to get that object back here, so that's why this argument exists. |
a data.frame
# None yet
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.