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:       086f8060-b8f4-4373-9f1c-91391133f783
#>   name:     Private land
#>   variable: .../sim_raster_spatial.tif#Private_land [total: 134 ]
#>   pane:  2ea56efd-2cf9-49fc-b626-f6af4f862c8b-Private_land
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#> 
#> [[2]]
#> Exclude
#>   id:       a4c51308-ec92-4d42-8a87-b14895658d9b
#>   name:     Uplands
#>   variable: .../sim_raster_spatial.tif#Uplands [total: 142 ]
#>   pane:  31a5074b-638d-43fe-8d65-6185be2b72ce-Uplands
#>   visible:  TRUE
#>   invisible:  NA
#>   loaded:  TRUE
#>   hidden:  FALSE
#>   downloadable:  TRUE
#>   status:   FALSE
#>   overlap:   NA
#>