Skip to contents

This function simulates Exclude objects.

Usage

simulate_excludes(dataset, n)

Arguments

dataset

Dataset object.

n

integer number of objects to simulate.

Value

A list of simulated Exclude objects.

See also

Examples

# find data file paths
f1 <- system.file(
  "extdata", "projects", "sim_raster", "sim_raster_spatial.tif",
  package = "wheretowork"
)
f2 <- system.file(
  "extdata",  "projects", "sim_raster", "sim_raster_attribute.csv.gz",
  package = "wheretowork"
)
f3 <- system.file(
  "extdata",  "projects", "sim_raster", "sim_raster_boundary.csv.gz",
  package = "wheretowork"
)

# create new dataset
d <- new_dataset(f1, f2, f3)

# simulate data
x <- simulate_excludes(dataset = d, n = 2)
# print results
print(x)
#> [[1]]
#> Exclude
#>   id:       0216f6d8-9eeb-4a8c-80b5-c7cada978978
#>   name:     Private land
#>   variable: .../sim_raster_spatial.tif#Private_land [total: 134 ]
#>   pane:  41485314-bd59-4b96-9d26-a78ad8cd939f-Private_land
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#> 
#> [[2]]
#> Exclude
#>   id:       c25b9b3d-90e9-4f19-95de-519c0eb5293e
#>   name:     Uplands
#>   variable: .../sim_raster_spatial.tif#Uplands [total: 142 ]
#>   pane:  99eef224-2ee0-44a9-b781-153b3c5e358c-Uplands
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#>