[ {NetLogoR} | R Documentation |
Extract or Replace Parts of an Object
Description
Operators acting on vectors, matrices, arrays and lists to extract or replace parts.
Usage
## S4 method for signature 'worldMatrix,numeric,numeric,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'worldMatrix,missing,missing,ANY'
x[i, j, ..., drop = TRUE]
## S4 replacement method for signature 'worldMatrix,numeric,numeric,ANY'
x[i, j] <- value
## S4 replacement method for signature 'worldMatrix,missing,missing,ANY'
x[i, j] <- value
## S4 method for signature 'worldArray,numeric,numeric,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'worldArray,missing,missing,ANY'
x[i, j, ..., drop = TRUE]
## S4 replacement method for signature 'worldArray,numeric,numeric,matrix'
x[i, j] <- value
## S4 replacement method for signature 'worldArray,missing,missing,matrix'
x[i, j] <- value
## S4 method for signature 'agentMatrix,numeric,numeric,ANY'
x[i, j, ..., drop = FALSE]
## S4 method for signature 'agentMatrix,logical,missing,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'agentMatrix,numeric,missing,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'agentMatrix,missing,missing,missing'
x[i, j, ..., drop = FALSE]
## S4 method for signature 'agentMatrix,missing,character,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'agentMatrix,numeric,character,ANY'
x[i, j, ..., drop = FALSE]
## S4 method for signature 'agentMatrix,missing,numeric,ANY'
x[i, j, ..., drop = FALSE]
## S4 replacement method for signature 'agentMatrix,numeric,numeric,numeric'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,missing,numeric,numeric'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,numeric,missing,numeric'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,numeric,character,data.frame'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,numeric,numeric,character'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,missing,numeric,character'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,missing,character,character'
x[i, j] <- value
## S4 replacement method for signature 'agentMatrix,numeric,character,character'
x[i, j] <- value
## S4 method for signature 'agentMatrix'
x$name
Arguments
x |
A |
i |
Indices specifying elements to extract or replace. |
j |
see |
... |
other named arguments |
drop |
not implemented |
value |
Any R object |
name |
A literal character string or a |
Value
An agentMatrix
when full row(s), full column(s) or element(s)
at specific row(s) and column(s) is/are extracted.
Note
Extract methods for agentMatrix
class will generally maintain the agentMatrix
class.
This means that there will still be coordinates, character columns represented as numerics etc.
$
is for extracting the raw columns and does not maintain the agentMatrix
class.
[]
will extract all values, and result in a data.frame with the correct character and
numeric columns.