calc_dosenumber: Calculate the dose number for each time in a set of...

View source: R/calc_dosenumber.R

calc_dosenumberR Documentation

Calculate the dose number for each time in a set of concentration-time data given the experimental details for that simulation

Description

calc_dosenumber is mainly for internal use in the SimcypConsultancy package and will calculate which dose number a given time should be if you provide the ct_dataframe and the extracted simulation experimental details (the output from extractExpDetails). This is meant to be used for a single simulation at a time or a set of concentration-time data where the dosing regimen is IDENTICAL for all simulations.

Usage

calc_dosenumber(ct_dataframe, existing_exp_details)

Arguments

ct_dataframe

a data.frame of concentration-time data from running either extractConcTime or extractConcTime_mult

existing_exp_details

the output from running extractExpDetails or extractExpDetails_mult on the same simulations that were used for making ct_dataframe. Note: If you would like to have this calculate dose numbers on data where you don't have simulation experimental details (example: observed data), then please supply a single-row data.frame with the following columns, using substrate dosing info as an example:

File

(character) each Simulator Excel file name (check that the file names match perfectly!) or "all" if you want the same dosing regimen for all files

DoseInt_sub

(numeric) the dosing interval in hours

StartHr_sub

(numeric) the start time for the substrate; probably 0

NumDoses_sub

(numeric) the number of doses overall

Regimen_sub

(character) presumably "Multiple Dose" but "Single Dose" is also acceptable

If you want the dose number for other compound IDs, then replace "_sub" with, e.g., "_inhib". Please run view(AllCompounds) to see acceptable suffixes for each compound ID.

Value

Output is a data.frame of concentration-time data with the calculated dose number included

Examples

# None yet


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.