Learn R Programming

DynTxRegime (version 3.01)

TxInfoFactor-class: Class

Description

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

Arguments

Objects from the Class

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

Slots

superSet:
An object of class "character." 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 = "factor", vec2 = "factor"): Compare vec1 and vec2 element-by_element for equality. Method is not exported.

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

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

Examples

Run this code
showClass("TxInfoFactor")

obj <- new("TxInfoFactor", superSet = c("A","B"), txName = "A1")

txVec1 <- as.factor(c("A","B","A","B"))
txVec2 <- as.factor(c("A","B","A","A"))

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

DynTxRegime:::.convertTx(object = obj, txVec = c("A","B","A","B"))

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

DynTxRegime:::.getSuperSet(object = obj)

DynTxRegime:::.getTxName(object = obj)

DynTxRegime:::.validTx(object = obj, txVec = c("A","B"))

try(DynTxRegime:::.validTx(object = obj, txVec = c("A","C")))

Run the code above in your browser using DataLab