fm_lattice_2d | R Documentation |
Construct a lattice grid for fm_mesh_2d()
fm_lattice_2d(...)
## Default S3 method:
fm_lattice_2d(
x = seq(0, 1, length.out = 2),
y = seq(0, 1, length.out = 2),
z = NULL,
dims = if (is.matrix(x)) {
dim(x)
} else {
c(length(x), length(y))
},
units = NULL,
crs = NULL,
...
)
... |
Passed on to submethods |
x |
vector or grid matrix of x-values |
y |
vector of grid matrix of y-values |
z |
if x is a matrix, a grid matrix of z-values |
dims |
the size of the grid, length 2 vector |
units |
One of |
crs |
An optional |
An fm_lattice_2d
object with elements
integer vector
x-values
y-values
matrix of (x, y)
values
fm_segm
object
fm_crs
object or NULL
Finn Lindgren finn.lindgren@gmail.com
fm_mesh_2d()
Other object creation and conversion:
fm_as_fm()
,
fm_as_lattice_2d()
,
fm_as_mesh_1d()
,
fm_as_mesh_2d()
,
fm_as_segm()
,
fm_as_sfc()
,
fm_as_tensor()
,
fm_mesh_1d()
,
fm_mesh_2d()
,
fm_segm()
,
fm_simplify()
,
fm_tensor()
lattice <- fm_lattice_2d(
seq(0, 1, length.out = 17),
seq(0, 1, length.out = 10)
)
## Use the lattice "as-is", without refinement:
mesh <- fm_rcdt_2d_inla(lattice = lattice, boundary = lattice$segm)
mesh <- fm_rcdt_2d_inla(lattice = lattice, extend = FALSE)
## Refine the triangulation, with limits on triangle angles and edges:
mesh <- fm_rcdt_2d(
lattice = lattice,
refine = list(max.edge = 0.08),
extend = FALSE
)
## Add an extension around the lattice, but maintain the lattice edges:
mesh <- fm_rcdt_2d(
lattice = lattice,
refine = list(max.edge = 0.08),
interior = lattice$segm
)
## Only add extension:
mesh <- fm_rcdt_2d(lattice = lattice, refine = list(max.edge = 0.08))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.