ToxTable_cycle: Tabulation of toxicities in a cycle

Description Usage Arguments Value See Also Examples

Description

Returns a toxicity table with the requested data according to the ass_TRUE column and for the cycles requested.

Usage

1
ToxTable_cycle(rt, cycles = "all")

Arguments

rt

an object of class robustToxicities

cycles

The cycle column names, or index in rt@periodDividerCols of the cycles to tabulate. May also be "all" to use all cycles. "all" is the default.

Value

data.frame

See Also

toxicityOptions-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Patient Level Data
data("rt_patientData")
# Toxicity Level Data
data("rt_toxicityData")


# Run the setup command passing in all the column names.
rt = SetupRobustToxicities(
  toxData = rt_toxicityData,
  patientData = rt_patientData,
  patidCol = "patientNo", treatmentCol = "Treatment",
  toxCategoryCol = "category", toxNameCol = "toxicity",
  toxGradeCol = "grade", dateOfStartOfToxWindow = "Registration_date",
  dateOfStartTox = "ae_onset_date", dateOfEndTox = "ae_resolve_date",
  dateOfEndOfToxWindow = "end_of_assessment_date",
  periodDividerCols = c("Registration_date", "Cycle_1_date","Cycle_2_date",
                        "Cycle_3_date", "Cycle_4_date", "Cycle_5_date", "Cycle_6_date"),
  periodDividerLabels = c("Pre treatment", "Cycle 1","Cycle 2",
                          "Cycle 3","Cycle 4","Cycle 5", "Cycle 6"),
  treatmentCodes = NULL, treatmentLabels = NULL, options = NULL)

# Look for queries. Note: must be called before running any
# of the functions on this class.
rt = QueryRobustToxicities(rt)

##########################################################
# default table
ToxTable_cycle(rt)

##########################################################
# We can change some of the options which are used to generate this table
# or subset the data using the ass_TRUE column in rt@toxData
# with percentages
rt@options@toxTable_tabulationPercent = TRUE
ToxTable_cycle(rt)
# A data.frame is returned if further manipulation is required

# without zeros
rt@options@toxTable_tabulationZeros = FALSE
ToxTable_cycle(rt)

# only toxicities with category "Nervous systen disorders"
rt@toxData$ass_TRUE = rt@toxData$category == "Nervous system disorders"
ToxTable_cycle(rt)
##########################################################
# flexTable default formatting
ft = FT_ToxTable_cycle(rt)
# returns an object of class ConstructFlexTable for additional formatting and editing
ft$GetTable()

csmoxford/robustToxicities documentation built on May 14, 2019, 12:24 p.m.