Learn R Programming

DynTxRegime (version 3.2)

TxInfoInteger-class: Class "TxInfoInteger"

Description

Stores basic treatment information for a single decision point when treatment is of class "integer."

Arguments

Objects from the Class

Objects can be created by calls of the form new("TxInfoInteger", ...). These objects are for convenience in package development and should not be created by users.

Slots

superSet:

An object of class "integer." A vector of all treatment options.

Extends

Class "TxInfoNoSubsets-class", directly. Class "TxInfoBasic-class" by class "TxInfoNoSubsets-class", distance 2. Class "SingleDecisionPoint-class" by class "TxInfoBasic-class", distance 3.

Methods

.compare

signature(object = "TxInfoFactor", vec1 = "integer", vec2 = "integer"): Compare vec1 and vec2 element-by_element for equality. Method is not exported.

.convertTx

signature(object = "TxInfoFactor", txVec = "numeric"): Convert txVec to a factor vector. Method is not exported.

.getLevels

signature(object = "TxInfoFactor", txVec = "integer"): Determine levels of factor vector input txVec. Method is not exported.

Examples

Run this code
# NOT RUN {
showClass("TxInfoInteger")

obj <- new("TxInfoInteger", superSet = c(0L,1L), txName = "A1")

txVec1 <- c(0L,1L,0L,1L)
txVec2 <- c(0L,1L,0L,0L)

DynTxRegime:::.compare(object = obj, vec1 = txVec1, vec2 = txVec2)

DynTxRegime:::.convertTx(object = obj, txVec = c(0,1,0,1))

DynTxRegime:::.getLevels(object = obj, txVec = txVec1)

DynTxRegime:::.getSuperSet(object = obj)

DynTxRegime:::.getTxName(object = obj)

DynTxRegime:::.validTx(object = obj, txVec = c(0L,1L))

try(DynTxRegime:::.validTx(object = obj, txVec = c(0L,2L)))
# }

Run the code above in your browser using DataLab