View source: R/class_WeightResults.R
new_weight_results | R Documentation |
Create a new WeightResults object to store results for a solution.
new_weight_results(weight, held, id = uuid::UUIDgenerate())
weight |
Weight object. |
held |
|
id |
|
A WeightResults 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 a new weight
w <- new_weight(name = "NDVI", variable = v)
# create a new weight results object to store results
wr <- new_weight_results(w, 80)
# print object
print(w)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.