Implementation methods for mapper objects
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.
## Default S3 method: ibm_n(mapper, ...) ## Default S3 method: ibm_values(mapper, ...) ## Default S3 method: ibm_amatrix(mapper, ...) ## Default S3 method: ibm_valid_input(mapper, input, ...) ## S3 method for class 'bru_mapper_inla_mesh_2d' ibm_n(mapper, ...) ## S3 method for class 'bru_mapper_inla_mesh_2d' ibm_values(mapper, ...) ## S3 method for class 'bru_mapper_inla_mesh_2d' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_inla_mesh_1d' ibm_n(mapper, ...) ## S3 method for class 'bru_mapper_inla_mesh_1d' ibm_values(mapper, ...) ## S3 method for class 'bru_mapper_inla_mesh_1d' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_index' ibm_valid_input(mapper, input, ...) ## S3 method for class 'bru_mapper_index' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_linear' ibm_n(mapper, ...) ## S3 method for class 'bru_mapper_linear' ibm_values(mapper, ...) ## S3 method for class 'bru_mapper_linear' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_factor' ibm_n(mapper, ...) ## S3 method for class 'bru_mapper_factor' ibm_values(mapper, ...) ## S3 method for class 'bru_mapper_factor' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_offset' ibm_n(mapper, ...) ## S3 method for class 'bru_mapper_offset' ibm_values(mapper, ...) ## S3 method for class 'bru_mapper_offset' ibm_amatrix(mapper, input, ...) ## S3 method for class 'bru_mapper_multi' ibm_n(mapper, multi = 0L, ...) ## S3 method for class 'bru_mapper_multi' ibm_values(mapper, multi = 0L, ...) ## S3 method for class 'bru_mapper_multi' ibm_amatrix(mapper, input, multi = 0L, ...) ## S3 method for class 'bru_mapper_multi' ibm_valid_input(mapper, input, multi = 0L, ...) ## S3 method for class 'bru_mapper_multi' x[i, drop = TRUE] ## S3 method for class 'bru_mapper_multi' names(x) ## S3 replacement method for class 'bru_mapper_multi' names(x) <- value
mapper |
A mapper S3 object, normally inheriting from |
... |
Arguments passed on to other methods |
input |
The values for which to produce a mapping matrix |
multi |
integer or logical;
If positive, the number of levels to recurse in a |
x |
object from which to extract element(s) |
i |
indices specifying element(s) to extract |
drop |
logical;
For |
value |
a character vector of up to the same length as x |
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.
[
-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
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.