Deprecated functions in inlabru
Source:R/deprecated.R
, R/bru.integration.R
, R/ggplot.R
, and 4 more
inlabru-deprecated.Rd
These functions still attempt to do their job, but will be removed in a future version.
Usage
ipoints(
samplers = NULL,
domain = NULL,
name = NULL,
group = NULL,
int.args = NULL,
project = deprecated()
)
cprod(..., na.rm = NULL, .blockwise = FALSE)
gmap(...)
gm(...)
integration_weight_aggregation(mesh, integ)
mesh_triangle_integration(mesh, tri_subset = NULL, nsub = NULL)
bru_int_polygon(...)
# Default S3 method
bru_mapper(...)
bru_mapper_offset(...)
is.inside(mesh, loc, mesh.coords = NULL)
vertices.inla.mesh(...)
pixels(mesh, nx = 150, ny = 150, mask = TRUE)
row_kron(M1, M2, repl = NULL, n.repl = NULL, weights = NULL)
Arguments
- samplers
Description of the integration region boundary. In 1D, a length 2 vector or two-column matrix where each row describes an interval, or
NULL
In 2D either aSpatialPolygon
or aSpatialLinesDataFrame
with aweight
column defining the width of the a transect line, and optionally further columns used by thegroup
argument, orNULL
. Whendomain
isNULL
,samplers
may also be aninla.mesh.1d
orinla.mesh
object, that is then treated as adomain
argument instead.- domain
Either
when
samplers
is a 1D interval(s) definition only,domain
can be a single integer for the number of integration points to place in each 1D interval, overridingint.args[["nsub1"]]
, and otherwisewhen
samplers
isNULL
,domain
can be a numeric vector of points, each given integration weight 1 (and no additional points are added in between),an
inla.mesh.1d
object for continuous 1D integration, oran
inla.mesh.2d
object for continuous 2D integration.
- name
Character array stating the name of the domains dimension(s). If
NULL
, the names are taken from coordinate names fromsamplers
forSpatial*
objects, otherwise "x", "y", "z" for 2D regions and"x"
for 1D regions- group
Column names of the
samplers
object (if applicable) for which the integration points are calculated independently and not merged when aggregating to mesh nodes.- int.args
List of arguments passed to
bru_int_polygon
.method
: "stable" (to aggregate integration weights onto mesh nodes) or "direct" (to construct a within triangle/segment integration scheme without aggregating onto mesh nodes)nsub1
,nsub2
: integers controlling the number of internal integration points before aggregation. Points per triangle:(nsub2+1)^2
. Points per knot segment:nsub1
poly_method
: if set to "legacy", selects an old polygon integration method that doesn't handle holes. No longer supported, and will generate an error.
- project
Deprecated in favour of
int.args(method=...)
. If TRUE, aggregate the integration points to mesh vertices. Default:project = (identical(int.args$method, "stable"))
- ...
Usually passed on to other methods
- na.rm
logical; if
TRUE
, the rows with weightNA
from the non-overlapping full_join will be removed; ifFALSE
, set the undefined weights toNA
. IfNULL
(default), act asTRUE
, but warn if any elements needed removing.- .blockwise
logical; if
FALSE
, computes full tensor product integration. IfTRUE
, computes within-block tensor product integration (used internally byfmesher::fm_int()
). DefaultFALSE
- mesh
An
inla.mesh
object- integ
list
ofloc
, integration points, andweight
, integration weights, or aSpatialPointsDataFrame
. Only the coordinates andweight
column are handled.- tri_subset
Optional triangle index vector for integration on a subset of the mesh triangles (Default
NULL
)- nsub
number of subdivision points along each triangle edge, giving
(nsub + 1)^2
proto-integration points used to compute the vertex weights (defaultNULL=9
, giving 100 integration points for each triangle)- loc
Points in space stored either as data.frame, a two-column matrix of x and y coordinates or a
SpatialPoints
object.- mesh.coords
Coordinate names of the mesh. Use only if loc is a data.frame with respective column names.
- nx
Number of pixels in x direction
- ny
Number of pixels in y direction
- mask
If logical and TRUE, remove pixels that are outside the mesh. If
mask
is aSpatial
object, only return pixels covered by this object.- M1
A matrix that can be transformed into a sparse Matrix.
- M2
A matrix that can be transformed into a sparse Matrix.
- repl
An optional index vector. For each entry, specifies which replicate the row belongs to, in the sense used in
INLA::inla.spde.make.A
- n.repl
The maximum replicate index, in the sense used in
INLA::inla.spde.make.A()
.- weights
Optional scaling weights to be applied row-wise to the resulting matrix.
Value
ipoints()
: A data.frame
, tibble
, sf
, or
SpatialPointsDataFrame
of 1D and 2D integration points, including a
weight
column and .block
column.
A data.frame
, sf
, or SpatialPointsDataFrame
of multidimensional
integration points and their weights
mesh_triangle_integration
returns alist
with elementsloc
andweight
with integration points for the mesh
is.inside()
: Single column matrix of Boolean values indicating if a
point is inside the mesh.
SpatialPixelsDataFrame
covering the mesh
Functions
ipoints()
: in favour offmesher::fm_int()
cprod()
: (Blockwise) cross product of integration points.Calculates the groupwise cross product of integration points in different dimensions and multiplies their weights accordingly. If the object defining points in a particular dimension has no weights attached to it all weights are assumed to be 1.
Legacy wrapper for
fmesher::fm_cprod()
gmap()
: Plot a map using extent of a spatial objectThis function is deprecated as
ggmap
isn't supported.Used
ggmap::get_map()
to query map services like Google Maps for a region centered around the spatial object provided. Then callsggmap()
to plot the map.This function required the
ggmap
package.gm()
: This function is deprecated asggmap
isn't supported.ggplot geom for spatial data
gm is a wrapper for the gg method. It will take the first argument and transform its coordinate system to latitude and longitude. Thereafter, gg is called using the transformed data and the arguments provided via
...
. gm is intended to replace gg whenever the data is supposed to be plotted over a spatial map generated by gmap, which only works if the coordinate system is latitude/longitude.integration_weight_aggregation()
: Aggregate integration weights onto mesh nodesUse
fmesher::fm_vertex_projection()
instead.mesh_triangle_integration()
: Integration scheme for mesh triangle interiorsUse
fmesher::fm_int_mesh_2d_core()
instead.bru_int_polygon()
: Integration points for polygons inside an inla.meshUse
fmesher::fm_int()
instead.bru_mapper(default)
: Callsbru_mapper_define
, passing all arguments along. Mapper implementations should callbru_mapper_define()
instead, and supply at least anew_class
class name. Use of thebru_mapper.default
method was deprecated from version 2.7.0, and removed in version 2.11.0bru_mapper_offset()
: Creates abru_mapper_const()
mapper.is.inside()
: Find out which points are inside a mesh. in favour offmesher::fm_is_within()
. Replaceis.inside(mesh, loc)
withfm_is_within(loc, mesh)
.vertices.inla.mesh()
: Extract vertex locations from aninla.mesh
. Converts the vertices of aninla.mesh
object into aSpatialPointsDataFrame
. Deprecated in favour offmesher::fm_vertices()
and no longer exported.pixels()
: GenerateSpatialPixels
covering aninla.mesh
. in favour offmesher::fm_pixels()
row_kron()
: Row-wise Kronecker products in favour offmesher::fm_row_kron()
.Takes two Matrices and computes the row-wise Kronecker product. Optionally applies row-wise weights and/or applies an additional 0/1 row-wise Kronecker matrix product.
Returns a
Matrix::sparseMatrix
object.
Author
Finn Lindgren finn.lindgren@gmail.com