Methods for extraction or replacements of parts of dual objects.
# S4 method for dual,index,index,dual
[(x, i, j, ...) <- value# S4 method for dual,missing,index,dual
[(x, i, j, ...) <- value
# S4 method for dual,index,missing,dual
[(x, i, j, ...) <- value
# S4 method for dual,missing,missing,dual
[(x, i, j, ...) <- value
# S4 method for dual,index,index,logicalOrNumericOrArray
[(x, i, j, ...) <- value
# S4 method for dual,missing,index,logicalOrNumericOrArray
[(x, i, j, ...) <- value
# S4 method for dual,index,missing,logicalOrNumericOrArray
[(x, i, j, ...) <- value
# S4 method for dual,missing,missing,logicalOrNumericOrArray
[(x, i, j, ...) <- value
# S4 method for dual,index,index
[(x, i, j, ..., drop = TRUE)
# S4 method for dual,missing,index
[(x, i, j, ..., drop = TRUE)
# S4 method for dual,index,missing
[(x, i, j, ..., drop = TRUE)
# S4 method for dual,missing,missing
[(x, i, j, ..., drop = TRUE)
returns a dual object (the semantic is the same as base extraction and replacement methods).
dual object
indices of elements to extract or replace
supplementary indices (for arrays)
replacement value
for dual matrices or array.
x <- c(1, 2, 3)
x[2] <- dual(4)
x
d(x)
Run the code above in your browser using DataLab