Learn R Programming

DynTxRegime (version 3.2)

.newTxInfoNoSubsets: Create Treatment Information Object When Subsets are not Identified

Description

Creates an object of class "TxInfoNoSubsets-class". Method is not exported.

Usage

.newTxInfoNoSubsets(txName, txVec, ...)
# S4 method for character,factor
.newTxInfoNoSubsets(txName, txVec, suppress)
# S4 method for character,integer
.newTxInfoNoSubsets(txName, txVec, suppress)

Arguments

txName

The column header of "data.frame" indicating the treatment variable.

txVec

The treatment variable.

...

Used to pass arguments that are required but the class of which does not determine the method that is selected.

suppress

T/F indicating if screen prints are generated.

Examples

Run this code
# NOT RUN {
# Integer treatment 
txVec <- rbinom(100,1,0.5)
txName <- "A1"

tst <- DynTxRegime:::.newTxInfoNoSubsets(txName = txName, 
                                         txVec = txVec,  
                                         suppress = FALSE)

is(tst)

# Factor treatment
txVec <- as.factor(txVec)

tst <- DynTxRegime:::.newTxInfoNoSubsets(txName = txName,  
                                         txVec = txVec,  
                                         suppress = FALSE)

is(tst)

# }

Run the code above in your browser using DataLab