## Most of the code for S4 classes included in this package was generated automatically with the following function calls.
## NOTE: EITHER DO NOT LOAD PACKAGE OR REMOVE LOADED CLASS DEFINITIONS (methods::classRemove) when running the scripts to create parent classes.
## STEP 1: CREATE NEW PARENT READYFORWHATSNEXT S4 CLASSES THAT DO NOT CONTAIN ANY OTHER READYFORWHATSNEXT S4 CLASSES
# devtools::load_all()
# write_scripts_to_mk_r4_clss(name_stub = "agents",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Populations of different types of agents",
# parent = NULL,
# class_slots = c("people","services"),
# type = c("data.frame","data.frame"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = NULL,
# prototype_tb = prototype_tb)
# write_scripts_to_mk_r4_clss(name_stub = "lookup",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Look up tables to use throughout readyforwhatsnext suite",
# parent = NULL,
# class_slots = c("sp_abbreviations_lup","sp_import_lup","sp_data_pack_lup","sp_resolution_lup","sp_site_coord_lup","sp_starter_sf_lup","sp_uid_lup"),
# type = c("rfwn_sp_abbreviations_lup","rfwn_sp_import_lup","rfwn_sp_data_pack_lup","rfwn_sp_resolution_lup","rfwn_sp_site_coord_lup","rfwn_sp_starter_sf_lup","rfwn_sp_uid_lup"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = NULL,
# prototype_tb = prototype_tb)
# write_scripts_to_mk_r4_clss(name_stub = "env",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Spacio-temporal environment",
# parent = NULL,
# class_slots = c("st_data","env_sf","par_vals"),
# type = c("list","sf","data.frame"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = NULL,
# prototype_tb = prototype_tb)
# write_scripts_to_mk_r4_clss(name_stub = "struc",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Structural parameter probability distributions and transformations",
# parent = NULL,
# class_slots = c("parameter_name","deterministic_val","param_1","param_2","param_3","param_4","transformation","use_in","evidence_source"),
# type = c("character","numeric","numeric","numeric","numeric","numeric","character","character","character"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = NULL,
# prototype_tb = prototype_tb)
# ## NOTE: EITHER RUN PARENT CLASS CREATION CODE FIRST OR LOAD PACKAGE BEFORE RUNNING SCRIPTS TO CREATE CHILD CLASSES.
# # devtools::load_all()
# # methods::removeClass("ready_profiled_area")
# ## STEP 2: CREATE NEW PARENT READYFORWHATSNEXT S4 CLASSES THAT CONTAIN OTHER READYFORWHATSNEXT S4 CLASSES CREATED IN STEP 1.
# prototype_tb <- prototype_tb %>%
# tibble::add_case(type = "r4test_lookup",
# value = "r4test_lookup()",
# old_class = FALSE)
# write_scripts_to_mk_r4_clss(name_stub = "profiled_area",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Information to create a profiled area object",
# parent = NULL,
# class_slots = c( "country","area_type","features","use_coord_lup","lookup_tb","crs_nbr","geom_dist_limit_km", "drive_time_limmit_mins", "nbr_bands", "data_year","data_ymds"),
# type = c("character","character","character","logical","r4test_lookup","numeric", "numeric", "numeric", "numeric", "character","POSIXt"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = c("r4test_lookup"),
# prototype_tb = prototype_tb)
# prototype_tb <- prototype_tb %>%
# tibble::add_case(type = c("r4test_env","r4test_agents"),
# value = c("r4test_env()","r4test_agents()"),
# old_class = c(FALSE,FALSE))
# write_scripts_to_mk_r4_clss(name_stub = "sim_data",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Data inputs for simulation",
# parent = NULL,
# class_slots = c("st_envir","agent_pops","age_lower","age_upper","pre_model_date","model_start_date","model_end_date","time_steps","nbr_steps","results"),
# type = c("r4test_env","r4test_agents","numeric","numeric","POSIXt","POSIXt","POSIXt","numeric","numeric","data.frame"),
# meaningful_names = NULL,
# values = NULL,
# allowed_values = NULL,
# include_classes = c("r4test_agents","r4test_env"),
# prototype_tb = prototype_tb)
# ## STEP 3: CREATE NEW READYFORWHATSNEXT S4 CLASSES, THAT ARE CHILDREN OF CLASSES CREATED IN STEPS 1-2.
# prototype_tb <- prototype_tb %>%
# tibble::add_case(type = c("r4test_struc"),
# value = c("r4test_struc()"),
# old_class = c(FALSE))
# write_scripts_to_mk_r4_clss(name_stub = "struc_pert",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Structural pert distribution parameters and transformations",
# parent = "r4test_struc",
# class_slots = c("distribution"),
# type = c("character"),
# meaningful_names = list(Parameter = "parameter_name",
# Deterministic_value = "deterministic_val",
# Distribution = "distribution",
# Mode = "param_1",
# Minimum = "param_2",
# Maximum = "param_3",
# Shape = "param_4",
# Transformation = "transformation",
# Use_in = "use_in",
# Source = "evidence_source"),
# values = "pert",
# allowed_values = list(distribution = "pert"),
# include_classes = c("r4test_agents","r4test_env"),
# prototype_tb = prototype_tb)
# write_scripts_to_mk_r4_clss(name_stub = "struc_unif",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Structural parameters using uniform distribution and transformations",
# parent = "r4test_struc",
# class_slots = c("distribution"),
# type = c("character"),
# meaningful_names = list(Parameter = "parameter_name",
# Deterministic_value = "deterministic_val",
# Distribution = "distribution",
# Unused_1 = "param_1",
# Unused_2 = "param_2",
# Unused_3= "param_3",
# Unused_4 = "param_4",
# Transformation = "transformation",
# Use_in = "use_in",
# Source = "evidence_source"),
# values = "uniform",
# allowed_values = list(distribution = "uniform"),
# prototype_tb = prototype_tb)
# write_scripts_to_mk_r4_clss(name_stub = "struc_norm",
# name_prefix = "r4test_",
# output_folder = "data-raw",
# class_desc = "Structural parameters using normal distribution and transformations",
# parent = "r4test_struc",
# class_slots = c("distribution"),
# type = c("character"),
# meaningful_names = list(Parameter = "parameter_name",
# Deterministic_value = "deterministic_val",
# Distribution = "distribution",
# Mean = "param_1",
# SE = "param_2",
# Unused_3= "param_3",
# Unused_4 = "param_4",
# Transformation = "transformation",
# Use_in = "use_in",
# Source = "evidence_source"),
# values = "normal",
# allowed_values = list(distribution = "normal"),
# prototype_tb = prototype_tb)
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.