Operators acting on vectors, matrices, arrays and lists to extract or replace parts.

# S4 method for worldMatrix,numeric,numeric,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for worldMatrix,missing,missing,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for worldMatrix,numeric,numeric,ANY
[(x, i, j) <- value

# S4 method for worldMatrix,missing,missing,ANY
[(x, i, j) <- value

# S4 method for worldArray,numeric,numeric,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for worldArray,missing,missing,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for worldArray,numeric,numeric,matrix
[(x, i, j) <- value

# S4 method for worldArray,missing,missing,matrix
[(x, i, j) <- value

# S4 method for agentMatrix,numeric,numeric,ANY
[(x, i, j, ..., drop = FALSE)

# S4 method for agentMatrix,logical,missing,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for agentMatrix,numeric,missing,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for agentMatrix,missing,missing,missing
[(x, i, j, ..., drop = FALSE)

# S4 method for agentMatrix,missing,character,ANY
[(x, i, j, ..., drop = TRUE)

# S4 method for agentMatrix,numeric,character,ANY
[(x, i, j, ..., drop = FALSE)

# S4 method for agentMatrix,missing,numeric,ANY
[(x, i, j, ..., drop = FALSE)

# S4 method for agentMatrix,numeric,numeric,numeric
[(x, i, j) <- value

# S4 method for agentMatrix,missing,numeric,numeric
[(x, i, j) <- value

# S4 method for agentMatrix,numeric,missing,numeric
[(x, i, j) <- value

# S4 method for agentMatrix,numeric,character,data.frame
[(x, i, j) <- value

# S4 method for agentMatrix,numeric,numeric,character
[(x, i, j) <- value

# S4 method for agentMatrix,missing,numeric,character
[(x, i, j) <- value

# S4 method for agentMatrix,missing,character,character
[(x, i, j) <- value

# S4 method for agentMatrix,numeric,character,character
[(x, i, j) <- value

# S4 method for agentMatrix
$(x, name)

Arguments

x

A agentMatrix object from which to extract element(s) or in which to replace element(s).

i

Indices specifying elements to extract or replace.

j

see i.

...

other named arguments

drop

not implemented

value

Any R object

name

A literal character string or a name() (possibly backtick quoted).

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.