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:       8ec63c8a-698a-49da-b15c-36c74d66b350
#>   name:     Private land
#>   variable: .../sim_raster_spatial.tif#Private_land [total: 134 ]
#>   pane:  f61ee7f0-25c7-43c7-8ef0-c095aa3b883e-Private_land
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#> 
#> [[2]]
#> Exclude
#>   id:       6bc5e460-bef8-498d-8f49-368ea8fbbec8
#>   name:     Uplands
#>   variable: .../sim_raster_spatial.tif#Uplands [total: 142 ]
#>   pane:  23587457-2712-4066-bd4a-55d00e52d0b8-Uplands
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#>