View source: R/fct_simulate_weights.R
simulate_weights | R Documentation |
This function simulates Weight objects.
simulate_weights(dataset, n, continuous = TRUE)
dataset |
Dataset object. |
n |
|
continuous |
|
A list
of simulated Weight objects.
new_weight.
# 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_weights(dataset = d, n = 2)
# print results
print(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.