cost_iv_compound_administration: Cost of administration for an intravenous treatment

Description Usage Arguments Details Value Examples

View source: R/convenience.R

Description

Cost of administration for an intravenous treatment

Usage

1
2
3
cost_iv_compound_administration(data_table, compound, time_col = "iv_time_hr",
  first_cost_col = "cost_admin_first_hr",
  addl_cost_col = "cost_admin_addl_hr", prorate_first = FALSE, ...)

Arguments

data_table

a data frame; see details.

compound

the name of the compound.

time_col, first_cost_col, addl_cost_col

parameter names in data_table.

prorate_first

can we charge for less than 1 unit of time? See details in cost_iv_administration().

...

additional arguments, filtering criteria that will be passed to heemod::look_up().

Details

data_table must have columns compound, param, and value. time_col, first_cost_col and addl_cost_col must be names in the param column. The required values are found in data_table using heemod::look_up(). Then the values are summed using cost_iv_administration().

Value

the cost

Examples

1
2
3
4
5
6
exampleParams <- 
  data.frame(compound = "X", 
  param = c("cost_admin_first_hr", "cost_admin_addl_hr",
            "iv_time_hr"),
  value = c(100, 20, 1.5))
  cost_iv_compound_administration(exampleParams, "X")

MattWiener/heemodFits documentation built on May 19, 2019, 8:21 a.m.