match_obs_to_sim: Match observed concentration-time data to the correct...

View source: R/match_obs_to_sim.R

match_obs_to_simR Documentation

Match observed concentration-time data to the correct simulated concentration-time data

Description

match_obs_to_sim will match observed concentration-time data to the correct simulated concentration-time data and figure out what the dose number should be at each time as well as figure out what the correct compound names should be since that's not included in observed-data Excel files for the Simulator. It will then add the observed data to your existing concentration-time data.frame.

Usage

match_obs_to_sim(
  ct_dataframe,
  obs_dataframe,
  obs_to_sim_assignment = NA,
  existing_exp_details = NA
)

Arguments

ct_dataframe

a data.frame of concentration-time data generated by running either extractConcTime or extractConcTime_mult. Not quoted.

obs_dataframe

a data.frame of observed concentration-time data generated by running either extractConcObsTime or extractObsConcTime_mult. Not quoted.

obs_to_sim_assignment

optionally specify which observed files should be compared to which simulator files. If left as NA, this will assume that all obsereved data should match all simulated data. To specify, use a data.frame like this: obs_to_sim_assignment = data.frame(ObsFile = c("obs data 1.xlsx", "obs data 2.xlsx"), File = c("mdz-5mg-qd.xlsx", "mdz-5mg-qd-cancer.xlsx")) or use a named character vector: obs_to_sim_assignment = c("obs data 1.xlsx" = "mdz-5mg-qd.xlsx", "obs data 2.xlsx" = "mdz-5mg-qd-cancer.xlsx")

existing_exp_details

the output from running extractExpDetails or extractExpDetails_mult on the same simulations that were used for making ct_dataframe. If you don't supply this, we'll run extractExpDetails_mult behind the scenes, which will increase the time this takes to run. If you would like to have this calculate dose numbers on data where you wouldn't have simulation experimental details (example: you've only got observed data), then supply a single-row data.frame with the following columns: File (character, just set this to "all" or some other placeholder text), DoseInt_sub (numeric), StartHr_sub (numeric; probably 0), NumDoses_sub (numeric), and Regimen_sub (character; presumably "Multiple Dose" here). If you want the dose number for other compound IDs, then replace "_sub" with, e.g., "_inhib". Please run view(ExpDetailDefinitions) to see examples of acceptable suffixes.

Value

returns a data.frame where the information from obs_dataframe has dose numbers, compound names, inhibitor names, etc. to match ct_dataframe, and obs_dataframe has been added to ct_dataframe.

Examples

# None yet


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