Extract {salad} | R Documentation |
Extract or replace parts of an object
Description
Methods for extraction or replacements of parts of dual objects.
Usage
## S4 replacement method for signature 'dual,index,index,dual'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,missing,index,dual'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,index,missing,dual'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,missing,missing,dual'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,index,index,logicalOrNumericOrArray'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,missing,index,logicalOrNumericOrArray'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,index,missing,logicalOrNumericOrArray'
x[i, j, ...] <- value
## S4 replacement method for signature 'dual,missing,missing,logicalOrNumericOrArray'
x[i, j, ...] <- value
## S4 method for signature 'dual,index,index'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'dual,missing,index'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'dual,index,missing'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'dual,missing,missing'
x[i, j, ..., drop = TRUE]
Arguments
x |
dual object |
i , j |
indices of elements to extract or replace |
... |
supplementary indices (for arrays) |
value |
replacement value |
drop |
for dual matrices or array. |
Value
returns a dual object (the semantic is the same as base extraction and replacement methods).
Examples
x <- c(1, 2, 3)
x[2] <- dual(4)
x
d(x)
[Package salad version 1.0 Index]