trimDoses {pkdata}R Documentation

Trim Dose Data Set

Description

Remove invalid doses by creating a time frame window constructed from drug level data.

Usage

trimDoses(
  doseData,
  drugLevelData,
  drugLevelID = "id",
  drugLevelTimeVar = "date.time",
  drugLevelVar = "fent.level",
  infusionDoseTimeVar = NULL,
  infusionDoseVar = NULL,
  bolusDoseTimeVar = NULL,
  bolusDoseVar = NULL,
  otherDoseTimeVar = NULL,
  otherDoseVar = NULL,
  lookForward = 7,
  last = NA
)

Arguments

doseData

data.frame; data set with dose information

drugLevelData

data.frame; data set with drug level data

drugLevelID

character string; name of ID variable, defaults to id

drugLevelTimeVar

character string; name of date-time variable, defaults to date.time

drugLevelVar

character string; name of drug level variable, defaults to fent.level

infusionDoseTimeVar

character string; name of infusion dose time variable

infusionDoseVar

character string; name of infusion dose variable

bolusDoseTimeVar

character string; name of bolus dose time variable

bolusDoseVar

character string; name of bolus dose variable

otherDoseTimeVar

character string; name of additional dose time variable

otherDoseVar

character string; name of additional dose variable

lookForward

integer; initializes the time frame window with the number of days prior to the first drug level data; defaults to 7

last

integer; sets the end of the time frame window to be "last" days after the first dose date, rather than the date of the last drug level data

Details

The time frame window is generally seven days before drug level data up through the last drug level data record. The window can be adjusted by setting the lookForward and last arguments.

Value

data.frame, containing trimmed dose data

Author(s)

Cole Beck


[Package pkdata version 0.1.0 Index]