Constructor method for integration scheme objects, allowing
default construction of .block information. Primarily meant for internal
use, but can be used to manually create data of the same structure as
fm_int() output.
Arguments
- object
An object representing integration points; either a data.frame-like object, or a vector/list of coordinates or other location reference objects.
- blocks
logical; if
TRUE, set per-element.blockindices. IfFALSE(default), set a common block,1L.- weight
Optional weight variable; if
NULL, all weights are set to 1.- name
character; name of the integration domain.
- override
logical; If
nameis non-NULL andoverride=TRUEfor sf object, the currentsf_columnis renamed toname.
Examples
new_fm_int(1:4, blocks = TRUE, weight = c(1, 2, 1, 3), name = "z")
#> # A tibble: 4 × 4
#> z weight .block .block_origin[,"z"]
#> <int> <dbl> <int> <int>
#> 1 1 1 1 1
#> 2 2 2 2 2
#> 3 3 1 3 3
#> 4 4 3 4 4