Learn R Programming

pkdata (version 0.1.0)

fixDuplicates: Remove Duplicate Dose Data

Description

Modify dose data to remove duplicate dose values.

Usage

fixDuplicates(
  data,
  idVar = "id",
  infusionDoseTimeVar = NULL,
  infusionDoseVar = NULL,
  moveBolus = FALSE,
  bolusDoseTimeVar = NULL,
  bolusDoseVar = NULL
)

Arguments

data

data.frame; data set with dose information

idVar

character string; name of ID variable, defaults to id

infusionDoseTimeVar

character string; name of infusion dose time variable

infusionDoseVar

character string; name of infusion dose variable

moveBolus

logical; allow duplicate infusion doses to be categorized as bolus

bolusDoseTimeVar

character string; name of bolus dose time variable

bolusDoseVar

character string; name of bolus dose variable

Value

data.frame, containing dose data

Details

Some duplicates can be adjusted by changing the date-time rounding. Others may be converted from one dose type to another, such as moving infusion to bolus.