View source: R/class_Feature.R
new_feature | R Documentation |
Create a new Feature object.
new_feature(
name,
variable,
visible = TRUE,
invisible = NA_real_,
loaded = TRUE,
hidden = FALSE,
downloadable = TRUE,
status = TRUE,
current = 0,
goal = 0.2,
limit_goal = 0,
id = uuid::UUIDgenerate(),
pane = paste(uuid::UUIDgenerate(), variable$index, sep = "-")
)
name |
|
variable |
Variable object. |
visible |
|
invisible |
|
loaded |
|
| |
downloadable |
|
status |
|
current |
|
goal |
|
limit_goal |
|
id |
|
pane |
|
A Feature 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(dataset = d, index = 1)
# create feature using the variable
f <- new_feature(name = "Intact Alvar", variable = v)
# print object
print(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.