A bru_mapper
sub-class implementation must provide an
ibm_matrix()
method. If the model size 'n' and definition
values 'values' are stored in the object itself, default methods are
available (see Details). Otherwise the
ibm_n()
and ibm_values()
methods also need to be provided.
# S3 method for default
ibm_n(mapper, ...)# S3 method for default
ibm_values(mapper, ...)
# S3 method for default
ibm_amatrix(mapper, ...)
# S3 method for default
ibm_valid_input(mapper, input, ...)
# S3 method for bru_mapper_inla_mesh_2d
ibm_n(mapper, ...)
# S3 method for bru_mapper_inla_mesh_2d
ibm_values(mapper, ...)
# S3 method for bru_mapper_inla_mesh_2d
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_inla_mesh_1d
ibm_n(mapper, ...)
# S3 method for bru_mapper_inla_mesh_1d
ibm_values(mapper, ...)
# S3 method for bru_mapper_inla_mesh_1d
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_index
ibm_valid_input(mapper, input, ...)
# S3 method for bru_mapper_index
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_linear
ibm_n(mapper, ...)
# S3 method for bru_mapper_linear
ibm_values(mapper, ...)
# S3 method for bru_mapper_linear
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_factor
ibm_n(mapper, ...)
# S3 method for bru_mapper_factor
ibm_values(mapper, ...)
# S3 method for bru_mapper_factor
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_offset
ibm_n(mapper, ...)
# S3 method for bru_mapper_offset
ibm_values(mapper, ...)
# S3 method for bru_mapper_offset
ibm_amatrix(mapper, input, ...)
# S3 method for bru_mapper_multi
ibm_n(mapper, multi = 0L, ...)
# S3 method for bru_mapper_multi
ibm_values(mapper, multi = 0L, ...)
# S3 method for bru_mapper_multi
ibm_amatrix(mapper, input, multi = 0L, ...)
# S3 method for bru_mapper_multi
ibm_valid_input(mapper, input, multi = 0L, ...)
# S3 method for bru_mapper_multi
[(x, i, drop = TRUE)
# S3 method for bru_mapper_multi
names(x)
# S3 method for bru_mapper_multi
names(x) <- value
A mapper S3 object, normally inheriting from bru_mapper
Arguments passed on to other methods
The values for which to produce a mapping matrix
integer or logical;
If positive, the number of levels to recurse in a bru_multi_mapper
.
If TRUE
, equivalent to 1L
. If FALSE
, equivalent to 0L
.
object from which to extract element(s)
indices specifying element(s) to extract
logical;
For [.bru_mapper_multi
, whether to extract an individual mapper when i
identifies a single element.
Default: TRUE
a character vector of up to the same length as x
[
-indexing a bru_mapper_multi
extracts a subset
bru_mapper_multi
object (for drop FALSE
) or an individual sub-mapper
(for drop TRUE
, and i
identifies a single element)
The names()
method for bru_mapper_multi
returns the names from the
sub-mappers list
The default ibm_n()
method returns a non-null element 'n' from the
mapper object, and gives an error if it doesn't exist.
The default ibm_values()
method returns a non-null element
'values' from the mapper object, and seq_len(ibm_n(mapper))
if
it doesn't exist.
The default ibm_amatrix()
method calls the ibm_amatrix
element function
of the object if it exists.
The default ibm_valid_input()
method returns an all-TRUE logical vector.
ibm_amatrix
for bru_mapper_multi
accepts a list with
named entries, or a list with unnamed but ordered elements.
The names must match the sub-mappers, see names.bru_mapper_multi()
.
Each list element should take a format accepted by the corresponding
sub-mapper. In case each element is a vector, the input can be given as a
data.frame with named columns, a matrix with named columns, or a matrix
with unnamed but ordered columns.
ibm_valid_input
for bru_mapper_multi
accepts a list with
named entries, or a list with unnamed but ordered elements.
The names must match the sub-mappers, see names.bru_mapper_multi()
.
Each list element should take a format accepted by the corresponding
sub-mapper. In case each element is a vector, the input can be given as a
data.frame with named columns, a matrix with named columns, or a matrix
with unnamed but ordered columns.