TxpSliceList-class | R Documentation |
Extension of S4Vectors::SimpleList that requires uniquely-named elements and holds only TxpSlice objects.
TxpSliceList(...)
## S4 method for signature 'TxpSliceList'
txpValueNames(x, simplify = FALSE)
## S4 method for signature 'TxpSliceList'
txpTransFuncs(x, simplify = FALSE)
## S4 method for signature 'TxpSliceList'
duplicated(x)
as.TxpSliceList(x)
... |
TxpSlice object to create |
x |
|
simplify |
Scalar logical, when |
Note, there is no coercion for TxpSlice to TxpSliceList
because unique
names are required.
txpValueNames(TxpSliceList)
: Return list
of txpValueNames
slots for the
contained TxpSlice objects, or vector
when simplify = TRUE
txpTransFuncs(TxpSliceList)
: Return list
of txpTransFuncs
slots for the
contained TxpSlice objects, or TxpTransFuncList when simplify = TRUE
duplicated(TxpSliceList)
: Returns logical vector of length(x)
, where
TRUE
indicates a duplicate slice in the list; see base::duplicated
## Create TxpSlice objects
s1 <- TxpSlice("input1", list(linear = function(x) x))
s2 <- TxpSlice(c("input2", "input3"),
list(log = function(x) log(x), sqrt = function(x) sqrt(x)))
## Create TxpSliceList
sl <- TxpSliceList(s1 = s1, s2 = s2)
## Accessors
txpValueNames(sl)
txpValueNames(sl, simplify = TRUE)
txpTransFuncs(sl)
txpTransFuncs(sl, simplify = TRUE)
## Coercion
as(list(s1 = TxpSlice("hello"), s2 = TxpSlice("user")), "TxpSliceList")
as.TxpSliceList(c(s1 = TxpSlice("hello"), s2 = TxpSlice("user")))
## Concatenation
c(sl, TxpSliceList(s3 = TxpSlice("input4")))
## Reduce TxpSliceList to single slice
Reduce(merge, sl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.