gail_sim_regions: Generate Artificial Polygon Regions

Description Usage Arguments Details Value See Also Examples

Description

Function for the simulation framework in GAIL. Create a set of spatial polygon regions. For a more comprehensive description of how to use the simulation framework, see the vignette "GAIL Simulation."

Usage

1
2
gail_sim_regions(npoints, type = "irregular", nedge = 5, seed = NULL,
  suid = NULL, ...)

Arguments

npoints

Number of internal points to select

type

Type of spatial units to generate, accepts "regular" and "irregular". See details.

nedge

Data frame containing the the cases, see details.

seed

If given, sets the seed for the RNG.

suid

Optional spatial unit ID, used as prefix for generated spatial units.

...

Space for additional arguments (e.g., for fields::cover.design).

Details

The type argument works as follows:

Value

Returns an object of class sf with POLYGON geometry. This represents a set of areal

See Also

gail_sim_rate, gail_sim_pop, gail_sim_index, gail_sim_assign

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
 loca_reg <- gail_gen_regions( npoints=40, type="regular"  , nedge=10, suid="reg" )
 loca_irr <- gail_gen_regions( npoints=40, type="irregular", nedge=6 , seed=42 , P=-20, Q=20 )
  
 ggplot( loca_reg ) + 
   geom_sf( aes(fill=region) )
 ggplot( loca_irr ) +
   geom_sf( aes(fill=region) )

## End(Not run)

jelsema/GAIL documentation built on June 29, 2019, 11:48 a.m.