Create a new ThemeResults object to store results for a solution.
Usage
new_theme_results(theme, feature_results, id = uuid::UUIDgenerate())
Arguments
- theme
Theme object.
- feature_results
FeatureResults object or a
list
of such objects.- id
character
unique identifier. Defaults to a random identifier (uuid::UUIDgenerate()
).
Value
A ThemeResults 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 new feature
f <- new_feature(name = "Intact Alvar", variable = v)
# create a theme using the single feature
th <- new_theme(name = "Intact Alvar", feature = f)
# create a feature results object to store results for the feature
fr <- new_feature_results(f, held = 0.8)
# create a theme results object to store results for the feature
thr <- new_theme_results(th, fr)
# print object
print(thr)
#> ThemeResults
#> id: d376ef08-cbe9-4f96-90c1-aa7aa4e0d691