Create mapper for an fm_mesh_1d
object
Usage
# S3 method for class 'fm_mesh_1d'
bru_mapper(mesh, indexed = TRUE, ...)
# S3 method for class 'bru_mapper_fm_mesh_1d'
ibm_n(mapper, ...)
# S3 method for class 'bru_mapper_fm_mesh_1d'
ibm_values(mapper, ...)
# S3 method for class 'bru_mapper_fm_mesh_1d'
ibm_jacobian(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_jacobian(mapper, input, ...)
Arguments
- mesh
An
fm_mesh_1d
object to use as a mapper- indexed
logical; If
TRUE
(default), theibm_values()
output will be the integer indexing sequence for the latent variables (needed forspde
models). IfFALSE
, the knot locations are returned (useful as an interpolator forrw2
models and similar).- ...
Arguments passed on to other methods
- mapper
A mapper S3 object, inheriting from
bru_mapper
.- input
Data input for the mapper.
Value
A bru_mapper_fm_mesh_1d
or fm_mapper_fmesher
object. The the
general bru_mapper_fmesher()
mapper handles all indexed fmesher
objects, except that NA
inputs for fm_mesh_1d
requires fmesher
version 0.2.0.9002
or later. The fmesher
version is detected, and an
appropriate mapper is created.
See also
bru_mapper, bru_mapper_generics
Other mappers:
bru_get_mapper()
,
bru_mapper()
,
bru_mapper.fm_mesh_2d()
,
bru_mapper_aggregate()
,
bru_mapper_collect()
,
bru_mapper_const()
,
bru_mapper_factor()
,
bru_mapper_fmesher()
,
bru_mapper_generics
,
bru_mapper_harmonics()
,
bru_mapper_index()
,
bru_mapper_linear()
,
bru_mapper_logsumexp()
,
bru_mapper_marginal()
,
bru_mapper_matrix()
,
bru_mapper_mesh_B()
,
bru_mapper_multi()
,
bru_mapper_pipe()
,
bru_mapper_repeat()
,
bru_mapper_scale()
,
bru_mapper_shift()
,
bru_mapper_taylor()
Examples
m <- bru_mapper(fm_mesh_1d(c(1:3, 5, 7)))
ibm_values(m)
#> [1] 1 2 3 4 5
ibm_eval(m, 1:7, 1:5)
#> [1] 1.0 2.0 3.0 3.5 4.0 4.5 5.0
m <- bru_mapper(fm_mesh_1d(c(1:3, 5, 7)), indexed = FALSE)
ibm_values(m)
#> [1] 1 2 3 5 7
ibm_eval(m, 1:7, 1:5)
#> [1] 1.0 2.0 3.0 3.5 4.0 4.5 5.0