td <- tempfile()
dir.create(td, recursive = TRUE)
modules <- data.frame(
"component" = c("data", "data", "plot", "plot"),
"long_component" = c("Load data", "Load data", "Plot data", "Plot data"),
"module" = c("user", "database", "histogram", "scatter"),
"long_module" = c("Upload your own data", "Query a database to obtain data",
"Plot the data as a histogram", "Plot the data as a scatterplot"),
"map" = c(TRUE, TRUE, FALSE, FALSE),
"result" = c(FALSE, FALSE, TRUE, TRUE),
"rmd" = c(TRUE, TRUE, TRUE, TRUE),
"save" = c(TRUE, TRUE, TRUE, TRUE),
"async" = c(TRUE, FALSE, FALSE, FALSE))
common_objects = c("raster", "histogram", "scatter")
create_template(path = td, name = "demo",
common_objects = common_objects, modules = modules,
author = "Simon E. H. Smart", include_map = TRUE, include_table = TRUE,
include_code = TRUE, install = FALSE)
Run the code above in your browser using DataLab