Create a new ThemeResults object to store results for a solution.
new_theme_results(theme, feature_results, id = uuid::UUIDgenerate())
theme | Theme object. |
---|---|
feature_results | FeatureResults object or a |
id |
|
A ThemeResults object.
# 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: e011183f-629a-4302-8bdc-800c55415153