computeTreatmentDuration: Computes treatment duration per line of therapy

Description Usage Arguments Value

View source: R/computeTreatmentDuration.R

Description

Computes treatment duration per line of therapy where a line of therapy as all drugs given within a defined range of days.

Usage

1

Arguments

data

A data frame generated by the function extractMedicalTherapy.

days

Number of days between the start of treatment that defines a line of therapy.

Value

Returns a data frame with treatment duration calculated per line of therapy. Output contains the same input with the addition of 4 new columns where line sequentional number of therapies, duration is the number of days between treatments, DaysFromTxStart is the number of days from the first line of therapy, and MedTxDayByLine it the recomputed number of days from the first line of therapy.


davidcoffey/Diamonds documentation built on March 8, 2020, 12:34 a.m.