Create a new Exclude object.
Usage
new_exclude(
name,
variable,
mandatory = FALSE,
visible = TRUE,
invisible = NA_real_,
loaded = TRUE,
hidden = FALSE,
downloadable = TRUE,
status = FALSE,
overlap = NA_character_,
id = uuid::UUIDgenerate(),
pane = paste(uuid::UUIDgenerate(), variable$index, sep = "-")
)Arguments
- name
characterName to display.- variable
Variable object.
- mandatory
logicalvalue indicating if object is mandatory for generating solutions.- visible
logicalThe initial visible value. This is used to determine if the feature is displayed (or not) or not the map. Defaults toTRUE.- invisible
numericdate/time. A time stamp date given to when a loaded layer is first turned invisible. This is used to keep track of loaded invisible layers to offload once the cache threshold has been reached. Defaults toNA_real_.- loaded
logicalThe initial loaded value. This is used to determine if the feature has been loaded into the DOM. Defaults toFALSE.logicalThe hidden value. This is used to determine if the feature can ever be displayed. Unlikevisible, if this parameter isFALSEthen a feature can never be viewed on the map. Defaults toFALSE.- downloadable
logicalThe downloadable value. This is used to determine if the feature can be download. Set downloadable toFALSEfor sensitive layers that should not be avaiable for download. Defaults toTRUE.- status
logicalThe initial status value. This is used to display information on whether the feature is selected (or not) for subsequent analysis. Defaults toTRUE.- overlap
charactervector that remainsNA_character_until set in the SolutionSettings object.overlapdefines the include and exclude overlap.- id
characterunique identifier. Defaults to a random identifier (uuid::UUIDgenerate()).- pane
characterunique map pane identifier. Defaults to a random identifier (uuid::UUIDgenerate()) concatenated with layer index.
Value
A Exclude object.
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)
# create new variable
v <- new_variable_from_auto(d, index = 1)
# create a new exclude
e <- new_exclude(name = "Protected areas", variable = v)
# print object
print(e)
#> Exclude
#> id: 54ab0350-fb50-40f8-b039-ea66b1c76287
#> name: Protected areas
#> variable: .../sim_raster_spatial.tif#Brown_necked_Parrot_Brown_necked_ [total: 483 ]
#> pane: 42b2d0d8-4465-4ebb-99ff-c32e3ae42728-Brown_necked_Parrot_Brown_necked_
#> visible: TRUE
#> invisible: NA
#> loaded: TRUE
#> hidden: FALSE
#> downloadable: TRUE
#> status: FALSE
#> overlap: NA