TxpModelList-class {toxpiR} | R Documentation |
List of TxpModel objects
Description
Extension of S4Vectors::SimpleList that holds only TxpModel objects.
Usage
TxpModelList(...)
## S4 method for signature 'TxpModelList'
duplicated(x)
as.TxpModelList(x)
Arguments
... |
TxpModel object to create |
x |
|
Functions
-
duplicated,TxpModelList-method
: Returns logical vector oflength(x)
, whereTRUE
indicates a duplicate model in the list; see base::duplicated -
as.TxpModelList
: Coerce list or TxpModel objects to TxpModelList
Examples
## Create some TxpModel objects; see ?TxpModel for more details
s1 <- list(S1 = TxpSlice("inpt1"), S2 = TxpSlice("inpt2"))
tf <- list(NULL, sqrt = function(x) sqrt(x))
m1 <- TxpModel(txpSlices = s1, txpWeights = 2:1, txpTransFuncs = tf)
m2 <- m1
txpSlices(m2) <- list(S3 = TxpSlice("inpt3"), S4 = TxpSlice("inpt4"))
m3 <- merge(m1, m2)
## Build a TxpModelList object
TxpModelList(m1 = m1, m2 = m2, m3 = m3)
## Note: names are printed as '' when all are NULL
TxpModelList(m1, m2, m3)
names(TxpModelList(m1, m2, m3))
## Test for duplicates
duplicated(TxpModelList(m1 = m1, m2 = m2, m3 = m3))
duplicated(TxpModelList(m1 = m1, m2 = m1, m3 = m3))
## Coerce lists/TxpModel objects to TxpModelList
as(list(m1 = m1, m2 = m2, m3 = m3), "TxpModelList")
as.TxpModelList(list(m1 = m1, m2 = m2, m3 = m3))
as(m1, "TxpModelList")
as.TxpModelList(m1)
[Package toxpiR version 1.2.1 Index]