Title: | Develop and Use Modular Health Economic Models |
---|---|
Description: | A template model module, tools to help find model modules derived from this template and a programming syntax to use these modules in health economic analyses. These elements are the foundation for a prototype software framework for developing living and transferable models and using those models in reproducible health economic analyses. The software framework is extended by other R libraries. For detailed documentation about the framework and how to use it visit <https://www.ready4-dev.com/>. For a background to the methodological issues that the framework is attempting to help solve, see Hamilton et al. (2024) <doi:10.1007/s40273-024-01378-8>. |
Authors: | Matthew Hamilton [aut, cre, cph]
|
Maintainer: | Matthew Hamilton <[email protected]> |
License: | GPL-3 |
Version: | 0.1.18 |
Built: | 2025-03-04 05:50:37 UTC |
Source: | https://github.com/ready4-dev/ready4 |
author() is a method that authors and saves files.
author(x, ...)
author(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
authorClasses() is a method that authors and saves R package files for creating and documenting classes to describe the data structures of model modules.
authorClasses(x, ...)
authorClasses(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
authorData() is a method that authors, documents and saves model module datasets.
authorData(x, ...)
authorData(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
authorFunctions() is a method that authors and saves R package files files necessary for creating and documenting functions that implement model module algorithms.
authorFunctions(x, ...)
authorFunctions(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
authorReport() is a method that authors and saves a report.
authorReport(x, ...)
authorReport(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
authorSlot() is a convenience method that applies the author method to a specified slot of a model module.
authorSlot method applied to Ready4Module
authorSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' authorSlot(x, slot_nm_1L_chr, ...)
authorSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' authorSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no value (when called for side effects only).
Either a ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no value (when called for side effects only).
characterize() is a method that generates descriptive tabular summaries about data contained in a model module.
characterize(x, ...)
characterize(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A data.frame, tibble or other table based class.
characterizeSlot() is a convenience method that applies the characterize method to a specified slot of a model module.
characterizeSlot method applied to Ready4Module
characterizeSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' characterizeSlot(x, slot_nm_1L_chr, ...)
characterizeSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' characterizeSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or a data.frame, tibble or other table class.
Either a ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or a data.frame, tibble or other table class.
depict() is a method that plots features of data contained in a model module (or sub-module).
depict(x, ...)
depict(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A ggplot, gg or other plot type class.
depictSlot() is a convenience method that applies the depict method to a specified slot of a model module.
depictSlot method applied to Ready4Module
depictSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' depictSlot(x, slot_nm_1L_chr, ...)
depictSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' depictSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no value (when called for side effects only).
Either a ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no value (when called for side effects only).
enhance() is a method that adds new data fields (columns for tabular data, elements for arrays) and values to a model module by transforming it into a module of an inheriting class.
enhance(x, ...)
enhance(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method.
enhanceSlot() is a convenience method that applies the enhance method to a specified slot a model module.
enhanceSlot method applied to Ready4Module
enhanceSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' enhanceSlot(x, slot_nm_1L_chr, ...)
enhanceSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' enhanceSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
A ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
exhibit() is a method that prints to console selected features of data contained in a model module.
exhibit(x, ...)
exhibit(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method or no return value (when called for side-effects only).
exhibitSlot() is a convenience method that applies the exhibit method to a specified slot a model module.
exhibitSlot method applied to Ready4Module
exhibitSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' exhibitSlot(x, slot_nm_1L_chr, ...)
exhibitSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' exhibitSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
Either a model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no return value (when called purely for side effects).
Either a ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or no return value (when called purely for side effects).
get_from_lup_obj() retrieves from a lookup table (a data.frame) the values in a target column for cases where values in a second column match a specified value.
get_from_lup_obj( data_lookup_tb, match_value_xx, match_var_nm_1L_chr, target_var_nm_1L_chr, evaluate_1L_lgl = FALSE )
get_from_lup_obj( data_lookup_tb, match_value_xx, match_var_nm_1L_chr, target_var_nm_1L_chr, evaluate_1L_lgl = FALSE )
data_lookup_tb |
Data lookup (a tibble) |
match_value_xx |
Match value (an output object of multiple potential types) |
match_var_nm_1L_chr |
Match variable name (a character vector of length one) |
target_var_nm_1L_chr |
Target variable name (a character vector of length one) |
evaluate_1L_lgl |
Evaluate (a logical vector of length one), Default: FALSE |
Cell value (an output object of multiple potential types)
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"), Treat = c("Cake", "Chocolate")) get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan", match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat") get_from_lup_obj(lookup_tb, match_value_xx = "Cake", match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")
lookup_tb <- tibble::tibble(Name = c("Sajid","Siobhan"), Treat = c("Cake", "Chocolate")) get_from_lup_obj(lookup_tb, match_value_xx = "Siobhan", match_var_nm_1L_chr = "Name", target_var_nm_1L_chr = "Treat") get_from_lup_obj(lookup_tb, match_value_xx = "Cake", match_var_nm_1L_chr = "Treat", target_var_nm_1L_chr = "Name")
get_gracefully() attempts to retrieve objects from the internet but returns NULL and an informative message if there is no internet connection or the specified resource could not be found.
get_gracefully( url_1L_chr, args_ls = NULL, fn = readRDS, not_chr_1L_lgl = F, tests_chr = character(0) )
get_gracefully( url_1L_chr, args_ls = NULL, fn = readRDS, not_chr_1L_lgl = F, tests_chr = character(0) )
url_1L_chr |
Url (a character vector of length one) |
args_ls |
Arguments (a list), Default: NULL |
fn |
Function (a function), Default: readRDS |
not_chr_1L_lgl |
Not character vector (a logical vector of length one), Default: F |
tests_chr |
Tests (a character vector), Default: character(0) |
Object (an output object of multiple potential types)
# Likely execution time greater than current CRAN limit. get_gracefully(paste0("https://github.com/ready4-dev/ready4/", "releases/download/Documentation_0.0/ready4_badges_lup.RDS")) get_gracefully("DOES NOT EXIST") if(requireNamespace("dataverse", quietly = TRUE)) { get_gracefully("https://doi.org/10.7910/DVN/RIQTKK", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "dataverse.harvard.edu")) get_gracefully("https://doi.org/10.7910/DVN/RIQTKK", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "DOES_NOT_EXIST")) get_gracefully("DOES_NOT_EXIST", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "dataverse.harvard.edu")) } if (requireNamespace("gh", quietly = TRUE)) { get_gracefully("/orgs/ready4-dev/repos", fn = gh::gh, args_ls=list(type = "public")) get_gracefully("DOES_NOT_EXIST", fn = gh::gh, args_ls=list(type = "public")) } if(requireNamespace("piggyback", quietly = TRUE)) { get_gracefully(NULL, fn = piggyback::pb_download_url, args_ls = list(repo = "ready4-dev/ready4", tag = "Documentation_0.0", .token = "")) get_gracefully(NULL, fn = piggyback::pb_download_url, args_ls = list(repo = "DOES_NOT_EXIST", tag = "DOES_NOT_EXIST", .token = "")) } if(requireNamespace("rvest", quietly = TRUE)) { get_gracefully("https://ready4-dev.github.io/ready4/index.html", fn=rvest::read_html) get_gracefully("DOES_NOT_EXIST", fn=rvest::read_html) } if(requireNamespace("tidyRSS", quietly = TRUE)) { get_gracefully("https://github.com/ready4-dev/ready4/releases.atom", fn = tidyRSS::tidyfeed) get_gracefully("DOES_NOT_EXIST", fn = tidyRSS::tidyfeed) }
# Likely execution time greater than current CRAN limit. get_gracefully(paste0("https://github.com/ready4-dev/ready4/", "releases/download/Documentation_0.0/ready4_badges_lup.RDS")) get_gracefully("DOES NOT EXIST") if(requireNamespace("dataverse", quietly = TRUE)) { get_gracefully("https://doi.org/10.7910/DVN/RIQTKK", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "dataverse.harvard.edu")) get_gracefully("https://doi.org/10.7910/DVN/RIQTKK", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "DOES_NOT_EXIST")) get_gracefully("DOES_NOT_EXIST", fn = dataverse::dataset_files, args_ls = list(key = NULL, server = "dataverse.harvard.edu")) } if (requireNamespace("gh", quietly = TRUE)) { get_gracefully("/orgs/ready4-dev/repos", fn = gh::gh, args_ls=list(type = "public")) get_gracefully("DOES_NOT_EXIST", fn = gh::gh, args_ls=list(type = "public")) } if(requireNamespace("piggyback", quietly = TRUE)) { get_gracefully(NULL, fn = piggyback::pb_download_url, args_ls = list(repo = "ready4-dev/ready4", tag = "Documentation_0.0", .token = "")) get_gracefully(NULL, fn = piggyback::pb_download_url, args_ls = list(repo = "DOES_NOT_EXIST", tag = "DOES_NOT_EXIST", .token = "")) } if(requireNamespace("rvest", quietly = TRUE)) { get_gracefully("https://ready4-dev.github.io/ready4/index.html", fn=rvest::read_html) get_gracefully("DOES_NOT_EXIST", fn=rvest::read_html) } if(requireNamespace("tidyRSS", quietly = TRUE)) { get_gracefully("https://github.com/ready4-dev/ready4/releases.atom", fn = tidyRSS::tidyfeed) get_gracefully("DOES_NOT_EXIST", fn = tidyRSS::tidyfeed) }
get_libraries_tb() retrieves a tabular summary of ready4 libraries that have been developed within a specified GitHub organisation.
get_libraries_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
get_libraries_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
Libraries (a tibble)
get_libraries_tb("ready4-dev/ready4")
get_libraries_tb("ready4-dev/ready4")
get_methods() retrieves the ready4 methods that are available for a specified ready4 model module.
get_methods(pkg_nm_1L_chr = "ready4", cls_nm_1L_chr = "Ready4Module")
get_methods(pkg_nm_1L_chr = "ready4", cls_nm_1L_chr = "Ready4Module")
pkg_nm_1L_chr |
Package name (a character vector of length one), Default: 'ready4' |
cls_nm_1L_chr |
Class name (a character vector of length one), Default: 'Ready4Module' |
Methods (a character vector)
get_methods()
get_methods()
get_methods_tb() ingests 'methods_tb.RDS' (a table of methods associated with ready4 model modules) from a specified GitHub repository release.
get_methods_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
get_methods_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
Methods (a tibble)
get_methods_tb("ready4-dev/ready4")
get_methods_tb("ready4-dev/ready4")
get_modules_tb() ingests 'modules_tb.RDS' (a table of ready4 model modules) from a specified GitHub repository release.
get_modules_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
get_modules_tb( gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0" )
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
Modules (a tibble)
get_modules_tb("ready4-dev/ready4")
get_modules_tb("ready4-dev/ready4")
ingest() is a method that ingests data saved in external files into a model module or submodule.
ingest(x, ...)
ingest(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance).
ingestSlot() is a convenience method that applies the ingest method to a specified slot of a model module.
ingestSlot method applied to Ready4Module
ingestSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' ingestSlot(x, slot_nm_1L_chr, ...)
ingestSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' ingestSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
A ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
investigate() is a method that applies an algorithm to data contained in a model module in order to solve an inverse problem (ie, identify a statistical model that can generate approximations of that data).
investigate(x, ...)
investigate(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance).
investigateSlot() is a convenience method that applies the investigate method to a specified slot of a model module.
investigateSlot method applied to Ready4Module
investigateSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' investigateSlot(x, slot_nm_1L_chr, ...)
investigateSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' investigateSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module).
A ready4 model module (an instance of a class that inherits from Ready4Module).
make_code_releases_tbl() scrapes the details of a specified GitHub repository to generate a release history of ready libraries and executables. To work all repositories without any release need to be supplied using the 'exclude_chr' argument.
make_code_releases_tbl( repo_type_1L_chr = c("Framework", "Module", "Package", "Program", "Subroutine", "Program_and_Subroutine"), as_kbl_1L_lgl = TRUE, brochure_repos_chr = character(0), exclude_chr = character(0), format_1L_chr = "%d-%b-%Y", framework_repos_chr = character(0), gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", model_repos_chr = character(0), program_repos_chr = character(0), org_1L_chr = "ready4-dev", repos_chr = character(0), subroutine_repos_chr = character(0), tidy_desc_1L_lgl = TRUE, url_stub_1L_chr = "https://ready4-dev.github.io/", ... )
make_code_releases_tbl( repo_type_1L_chr = c("Framework", "Module", "Package", "Program", "Subroutine", "Program_and_Subroutine"), as_kbl_1L_lgl = TRUE, brochure_repos_chr = character(0), exclude_chr = character(0), format_1L_chr = "%d-%b-%Y", framework_repos_chr = character(0), gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", model_repos_chr = character(0), program_repos_chr = character(0), org_1L_chr = "ready4-dev", repos_chr = character(0), subroutine_repos_chr = character(0), tidy_desc_1L_lgl = TRUE, url_stub_1L_chr = "https://ready4-dev.github.io/", ... )
repo_type_1L_chr |
Repository type (a character vector of length one), Default: c("Framework", "Module", "Package", "Program", "Subroutine", "Program_and_Subroutine") |
as_kbl_1L_lgl |
As kable (a logical vector of length one), Default: TRUE |
brochure_repos_chr |
Brochure repositories (a character vector), Default: character(0) |
exclude_chr |
Exclude (a character vector), Default: character(0) |
format_1L_chr |
Format (a character vector of length one), Default: '%d-%b-%Y' |
framework_repos_chr |
Framework repositories (a character vector), Default: character(0) |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
model_repos_chr |
Model repositories (a character vector), Default: character(0) |
program_repos_chr |
Program repositories (a character vector), Default: character(0) |
org_1L_chr |
Organisation (a character vector of length one), Default: 'ready4-dev' |
repos_chr |
Repositories (a character vector), Default: character(0) |
subroutine_repos_chr |
Subroutine repositories (a character vector), Default: character(0) |
tidy_desc_1L_lgl |
Tidy description (a logical vector of length one), Default: TRUE |
url_stub_1L_chr |
Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/' |
... |
Additional arguments |
Releases (an output object of multiple potential types)
# Likely to take more than one minute to execute. if(requireNamespace("tidyRSS", quietly = TRUE)) { make_code_releases_tbl("Framework", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Module", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4") }
# Likely to take more than one minute to execute. if(requireNamespace("tidyRSS", quietly = TRUE)) { make_code_releases_tbl("Framework", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Module", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4") make_code_releases_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4") }
make_datasts_tb() scrapes metadata from a specified Dataverse collection to create a summary table of its contents. The contents table can detail either subsidiary data collections or individual datasets from those subsidiary data collections.
make_datasets_tb( dv_nm_1L_chr = "ready4", dvs_tb = NULL, filter_cdns_ls = NULL, key_1L_chr = NULL, server_1L_chr = "dataverse.harvard.edu", toy_data_dv_1L_chr = "fakes", type_1L_chr = c("collections", "datasets"), what_1L_chr = "all" )
make_datasets_tb( dv_nm_1L_chr = "ready4", dvs_tb = NULL, filter_cdns_ls = NULL, key_1L_chr = NULL, server_1L_chr = "dataverse.harvard.edu", toy_data_dv_1L_chr = "fakes", type_1L_chr = c("collections", "datasets"), what_1L_chr = "all" )
dv_nm_1L_chr |
Dataverse name (a character vector of length one), Default: 'ready4' |
dvs_tb |
Dataverses (a tibble), Default: NULL |
filter_cdns_ls |
Filter conditions (a list), Default: NULL |
key_1L_chr |
Key (a character vector of length one), Default: NULL |
server_1L_chr |
Server (a character vector of length one), Default: 'dataverse.harvard.edu' |
toy_data_dv_1L_chr |
Toy data dataverse (a character vector of length one), Default: 'fakes' |
type_1L_chr |
Type (a character vector of length one), Default: c("collections", "datasets") |
what_1L_chr |
What (a character vector of length one), Default: 'all' |
Datasets (a tibble)
# Likely to take more than one minute to execute. make_datasets_tb("ready4") dvs_tb <- get_datasets_tb("ready4-dev/ready4") make_datasets_tb("ready4", dvs_tb = dvs_tb) make_datasets_tb("ready4", dvs_tb = dvs_tb, what_1L_chr = "real") make_datasets_tb("ready4", dvs_tb = dvs_tb, what_1L_chr = "fakes") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets", what_1L_chr = "real") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets", what_1L_chr = "fakes")
# Likely to take more than one minute to execute. make_datasets_tb("ready4") dvs_tb <- get_datasets_tb("ready4-dev/ready4") make_datasets_tb("ready4", dvs_tb = dvs_tb) make_datasets_tb("ready4", dvs_tb = dvs_tb, what_1L_chr = "real") make_datasets_tb("ready4", dvs_tb = dvs_tb, what_1L_chr = "fakes") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets", what_1L_chr = "real") make_datasets_tb("ready4", dvs_tb = dvs_tb, type_1L_chr = "datasets", what_1L_chr = "fakes")
make_ds_releases_tbl() scrapes metadata from Dataverse datasets for which a valid Digital Object Identifier (DOI) has been supplied to create a table summarising the entire release history of these datasets.
make_ds_releases_tbl( ds_dois_chr, format_1L_chr = "%d-%b-%Y", key_1L_chr = NULL, server_1L_chr = "dataverse.harvard.edu", as_kbl_1L_lgl = TRUE, ... )
make_ds_releases_tbl( ds_dois_chr, format_1L_chr = "%d-%b-%Y", key_1L_chr = NULL, server_1L_chr = "dataverse.harvard.edu", as_kbl_1L_lgl = TRUE, ... )
ds_dois_chr |
Dataset digital object identifiers (a character vector) |
format_1L_chr |
Format (a character vector of length one), Default: '%d-%b-%Y' |
key_1L_chr |
Key (a character vector of length one), Default: NULL |
server_1L_chr |
Server (a character vector of length one), Default: 'dataverse.harvard.edu' |
as_kbl_1L_lgl |
As kable (a logical vector of length one), Default: TRUE |
... |
Additional arguments |
Dataset releases (an output object of multiple potential types)
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = FALSE)
make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = FALSE)
make_methods_tb() scrapes the documentation websites of all libraries of ready4 modules in a specified GitHub organisation and then creates a tabular summary of vignette examples of ready4 module methods.
make_methods_tb( packages_tb = NULL, exclude_mthds_for_chr = NA_character_, framework_only_1L_lgl = TRUE, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", path_1L_chr = character(0), return_1L_chr = "all" )
make_methods_tb( packages_tb = NULL, exclude_mthds_for_chr = NA_character_, framework_only_1L_lgl = TRUE, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", path_1L_chr = character(0), return_1L_chr = "all" )
packages_tb |
Packages (a tibble), Default: NULL |
exclude_mthds_for_chr |
Exclude methods for (a character vector), Default: 'NA' |
framework_only_1L_lgl |
Framework only (a logical vector of length one), Default: TRUE |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
module_pkgs_chr |
Module packages (a character vector), Default: character(0) |
ns_var_nm_1L_chr |
Namespace variable name (a character vector of length one), Default: 'pt_ns_chr' |
path_1L_chr |
Path (a character vector of length one), Default: character(0) |
return_1L_chr |
Return (a character vector of length one), Default: 'all' |
Methods (a tibble)
# Likely to take more than one minute to execute. make_methods_tb(gh_repo_1L_chr = "ready4-dev/ready4")
# Likely to take more than one minute to execute. make_methods_tb(gh_repo_1L_chr = "ready4-dev/ready4")
make_modules_tb() scrapes the documentation websites of all libraries of ready4 modules in a specified GitHub organisation and then creates a tabular summary of the modules included in those libraries and vignette examples of their use.
make_modules_tb( pkg_extensions_tb = NULL, cls_extensions_tb = NULL, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", module_pkgs_chr = character(0), include_1L_chr = "modules", ns_var_nm_1L_chr = "pt_ns_chr", url_stub_1L_chr = "https://ready4-dev.github.io/", what_chr = "all" )
make_modules_tb( pkg_extensions_tb = NULL, cls_extensions_tb = NULL, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", module_pkgs_chr = character(0), include_1L_chr = "modules", ns_var_nm_1L_chr = "pt_ns_chr", url_stub_1L_chr = "https://ready4-dev.github.io/", what_chr = "all" )
pkg_extensions_tb |
Package extensions (a tibble), Default: NULL |
cls_extensions_tb |
Class extensions (a tibble), Default: NULL |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
module_pkgs_chr |
Module packages (a character vector), Default: character(0) |
include_1L_chr |
Include (a character vector of length one), Default: 'modules' |
ns_var_nm_1L_chr |
Namespace variable name (a character vector of length one), Default: 'pt_ns_chr' |
url_stub_1L_chr |
Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/' |
what_chr |
What (a character vector), Default: 'all' |
Modules (a tibble)
# Likely to take more than one minute to execute. make_modules_tb(gh_repo_1L_chr = "ready4-dev/ready4")
# Likely to take more than one minute to execute. make_modules_tb(gh_repo_1L_chr = "ready4-dev/ready4")
make_programs_tbl() scrapes the GitHub organisation and Zenodo community associated specified for a ready4 model implementation to create a tabular summary of programs and sub-routines associated with that implementation.
make_programs_tbl( what_1L_chr = c("Program", "Subroutine", "Program_and_Subroutine"), as_kbl_1L_lgl = FALSE, exclude_chr = character(0), format_1L_chr = "%d-%b-%Y", gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", tidy_desc_1L_lgl = TRUE, url_stub_1L_chr = "https://ready4-dev.github.io/", zenodo_1L_chr = "ready4", ... )
make_programs_tbl( what_1L_chr = c("Program", "Subroutine", "Program_and_Subroutine"), as_kbl_1L_lgl = FALSE, exclude_chr = character(0), format_1L_chr = "%d-%b-%Y", gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", tidy_desc_1L_lgl = TRUE, url_stub_1L_chr = "https://ready4-dev.github.io/", zenodo_1L_chr = "ready4", ... )
what_1L_chr |
What (a character vector of length one), Default: c("Program", "Subroutine", "Program_and_Subroutine") |
as_kbl_1L_lgl |
As kable (a logical vector of length one), Default: FALSE |
exclude_chr |
Exclude (a character vector), Default: character(0) |
format_1L_chr |
Format (a character vector of length one), Default: '%d-%b-%Y' |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
tidy_desc_1L_lgl |
Tidy description (a logical vector of length one), Default: TRUE |
url_stub_1L_chr |
Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/' |
zenodo_1L_chr |
Zenodo (a character vector of length one), Default: 'ready4' |
... |
Additional arguments |
Programs (an output object of multiple potential types)
# Likely to take more than one minute to execute. if(requireNamespace("zen4R", quietly = TRUE)) { make_programs_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4") make_programs_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4") }
# Likely to take more than one minute to execute. if(requireNamespace("zen4R", quietly = TRUE)) { make_programs_tbl("Program", gh_repo_1L_chr = "ready4-dev/ready4") make_programs_tbl("Subroutine", gh_repo_1L_chr = "ready4-dev/ready4") }
manufacture() is a method that used data contained in a model module or submodule to create a new object (other than a model module).
manufacture(x, ...)
manufacture(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
An object other than a model module (an instance of a class that inherits from Ready4Module).
manufactureSlot() is a convenience method that applies the manufacture method to a specified slot of a model module.
manufactureSlot method applied to Ready4Module
manufactureSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' manufactureSlot(x, slot_nm_1L_chr, ...)
manufactureSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' manufactureSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
An object that is not the the same class as that supplied to the method.
An object that is not the the same class as that supplied to the method.
metamorphose() is a method that transforms a model module into a model module of a different (non-inheriting) class.
metamorphose(x, ...)
metamorphose(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) of a different class to that supplied to the method.
metamorphoseSlot() is a convenience method that applies the metamorphose method to a specified slot of a model module.
metamorphoseSlot method applied to Ready4Module
metamorphoseSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' metamorphoseSlot(x, slot_nm_1L_chr, ...)
metamorphoseSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' metamorphoseSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module).
A ready4 model module (an instance of a class that inherits from Ready4Module).
print_data() formats the output of either get_datasts_tb() or make_datasts_tb() as HTML. The type of output can be customised to display Dataverse data collections or Dataverse datasets. Similarly output can be restricted to real or toy datasets.
print_data( datasets_tb, by_dv_1L_lgl = FALSE, filter_cdns_ls = NULL, root_1L_chr = "https://dataverse.harvard.edu/dataverse/", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), toy_data_dv_1L_chr = "fakes", what_1L_chr = "all", ... )
print_data( datasets_tb, by_dv_1L_lgl = FALSE, filter_cdns_ls = NULL, root_1L_chr = "https://dataverse.harvard.edu/dataverse/", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), toy_data_dv_1L_chr = "fakes", what_1L_chr = "all", ... )
datasets_tb |
Datasets (a tibble) |
by_dv_1L_lgl |
By dataverse (a logical vector of length one), Default: FALSE |
filter_cdns_ls |
Filter conditions (a list), Default: NULL |
root_1L_chr |
Root (a character vector of length one), Default: 'https://dataverse.harvard.edu/dataverse/' |
scroll_height_1L_chr |
Scroll height (a character vector of length one), Default: character(0) |
scroll_width_1L_chr |
Scroll width (a character vector of length one), Default: character(0) |
toy_data_dv_1L_chr |
Toy data dataverse (a character vector of length one), Default: 'fakes' |
what_1L_chr |
What (a character vector of length one), Default: 'all' |
... |
Additional arguments |
Datasets (a kable)
datasets_tb <- get_datasets_tb("ready4-dev/ready4") print_data(datasets_tb, by_dv_1L_lgl = TRUE) print_data(datasets_tb, what_1L_chr = "real") print_data(datasets_tb, what_1L_chr = "fakes")
datasets_tb <- get_datasets_tb("ready4-dev/ready4") print_data(datasets_tb, by_dv_1L_lgl = TRUE) print_data(datasets_tb, what_1L_chr = "real") print_data(datasets_tb, what_1L_chr = "fakes")
print_methods() formats the output of either get_methods_tb() or make_methods_tb() as HTML.
print_methods( methods_tb = NULL, exclude_mthds_for_chr = NA_character_, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", methods_chr = NULL, module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", path_1L_chr = character(0), packages_tb = NULL, return_1L_chr = "all", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), ... )
print_methods( methods_tb = NULL, exclude_mthds_for_chr = NA_character_, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", methods_chr = NULL, module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", path_1L_chr = character(0), packages_tb = NULL, return_1L_chr = "all", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), ... )
methods_tb |
Methods (a tibble), Default: NULL |
exclude_mthds_for_chr |
Exclude methods for (a character vector), Default: 'NA' |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
methods_chr |
Methods (a character vector), Default: NULL |
module_pkgs_chr |
Module packages (a character vector), Default: character(0) |
ns_var_nm_1L_chr |
Namespace variable name (a character vector of length one), Default: 'pt_ns_chr' |
path_1L_chr |
Path (a character vector of length one), Default: character(0) |
packages_tb |
Packages (a tibble), Default: NULL |
return_1L_chr |
Return (a character vector of length one), Default: 'all' |
scroll_height_1L_chr |
Scroll height (a character vector of length one), Default: character(0) |
scroll_width_1L_chr |
Scroll width (a character vector of length one), Default: character(0) |
... |
Additional arguments |
Methods (a kable)
methods_tb <- get_methods_tb("ready4-dev/ready4") print_methods(methods_tb) print_methods(methods_tb, return_1L_chr = "core") print_methods(methods_tb, return_1L_chr = "slot") print_methods(methods_tb, return_1L_chr = "extended")
methods_tb <- get_methods_tb("ready4-dev/ready4") print_methods(methods_tb) print_methods(methods_tb, return_1L_chr = "core") print_methods(methods_tb, return_1L_chr = "slot") print_methods(methods_tb, return_1L_chr = "extended")
print_modules() formats the output of either get_modules_tb() or make_modules_tb() as HTML.
print_modules( modules_tb, scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), what_1L_chr = "All", ... )
print_modules( modules_tb, scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), what_1L_chr = "All", ... )
modules_tb |
Modules (a tibble) |
scroll_height_1L_chr |
Scroll height (a character vector of length one), Default: character(0) |
scroll_width_1L_chr |
Scroll width (a character vector of length one), Default: character(0) |
what_1L_chr |
What (a character vector of length one), Default: 'All' |
... |
Additional arguments |
Modules (a kable)
modules_tb <- get_modules_tb("ready4-dev/ready4") # Print sub-modules print_modules(modules_tb, what_1L_chr = "S3") # Print full-modules print_modules(modules_tb, what_1L_chr = "S4")
modules_tb <- get_modules_tb("ready4-dev/ready4") # Print sub-modules print_modules(modules_tb, what_1L_chr = "S3") # Print full-modules print_modules(modules_tb, what_1L_chr = "S4")
print_packages() formats the output of get_libraries_tb() as HTML.
print_packages( pkg_extensions_tb = NULL, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", include_1L_chr = "modules", module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", project_badges_url_1L_chr = "https://img.shields.io/badge/ready4", reference_var_nm_1L_chr = "Reference", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), sections_chr = character(0), url_stub_1L_chr = "https://ready4-dev.github.io/", vignette_var_nm_1L_chr = "Vignettes", vignette_url_var_nm_1L_chr = "Vignettes_URLs", what_chr = "all", ... )
print_packages( pkg_extensions_tb = NULL, gh_repo_1L_chr = "ready4-dev/ready4", gh_tag_1L_chr = "Documentation_0.0", include_1L_chr = "modules", module_pkgs_chr = character(0), ns_var_nm_1L_chr = "pt_ns_chr", project_badges_url_1L_chr = "https://img.shields.io/badge/ready4", reference_var_nm_1L_chr = "Reference", scroll_height_1L_chr = character(0), scroll_width_1L_chr = character(0), sections_chr = character(0), url_stub_1L_chr = "https://ready4-dev.github.io/", vignette_var_nm_1L_chr = "Vignettes", vignette_url_var_nm_1L_chr = "Vignettes_URLs", what_chr = "all", ... )
pkg_extensions_tb |
Package extensions (a tibble), Default: NULL |
gh_repo_1L_chr |
Github repository (a character vector of length one), Default: 'ready4-dev/ready4' |
gh_tag_1L_chr |
Github tag (a character vector of length one), Default: 'Documentation_0.0' |
include_1L_chr |
Include (a character vector of length one), Default: 'modules' |
module_pkgs_chr |
Module packages (a character vector), Default: character(0) |
ns_var_nm_1L_chr |
Namespace variable name (a character vector of length one), Default: 'pt_ns_chr' |
project_badges_url_1L_chr |
Project badges url (a character vector of length one), Default: 'https://img.shields.io/badge/ready4' |
reference_var_nm_1L_chr |
Reference variable name (a character vector of length one), Default: 'Reference' |
scroll_height_1L_chr |
Scroll height (a character vector of length one), Default: character(0) |
scroll_width_1L_chr |
Scroll width (a character vector of length one), Default: character(0) |
sections_chr |
Sections (a character vector), Default: character(0) |
url_stub_1L_chr |
Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/' |
vignette_var_nm_1L_chr |
Vignette variable name (a character vector of length one), Default: 'Vignettes' |
vignette_url_var_nm_1L_chr |
Vignette url variable name (a character vector of length one), Default: 'Vignettes_URLs' |
what_chr |
What (a character vector), Default: 'all' |
... |
Additional arguments |
Package extensions (a kable)
# Method 1 libraries_tb <- get_libraries_tb(gh_repo_1L_chr = "ready4-dev/ready4") ## Print framework libraries update_libraries_tb(libraries_tb, url_stub_1L_chr = "https://ready4-dev.github.io/", include_1L_chr = "framework") %>% print_packages() ## Print module libraries update_libraries_tb(libraries_tb, url_stub_1L_chr = "https://ready4-dev.github.io/", include_1L_chr = "modules") %>% print_packages() # Method 2 ## Print framework libraries print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "framework") ## Print module libraries print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "modules")
# Method 1 libraries_tb <- get_libraries_tb(gh_repo_1L_chr = "ready4-dev/ready4") ## Print framework libraries update_libraries_tb(libraries_tb, url_stub_1L_chr = "https://ready4-dev.github.io/", include_1L_chr = "framework") %>% print_packages() ## Print module libraries update_libraries_tb(libraries_tb, url_stub_1L_chr = "https://ready4-dev.github.io/", include_1L_chr = "modules") %>% print_packages() # Method 2 ## Print framework libraries print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "framework") ## Print module libraries print_packages(gh_repo_1L_chr = "ready4-dev/ready4", include_1L_chr = "modules")
procure() is a "getter" method that retrieves data contained within a model module or sub-module.
procure(x, ...)
procure(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
An object of the same class as that supplied to the method or of one of the same classes that constitute the input object's slots or elements.
procureSlot() is a "getter" method that, depending on input arguments, retrieves either data contained in a specified model module slot (the default behaviour) or the value returned by applying the procure method to the specified slot.
procureSlot method applied to Ready4Module
procureSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' procureSlot(x, slot_nm_1L_chr, use_procure_mthd_1L_lgl = FALSE, ...)
procureSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' procureSlot(x, slot_nm_1L_chr, use_procure_mthd_1L_lgl = FALSE, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
use_procure_mthd_1L_lgl |
Use procure method (a length one logical vector) |
A model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or an instance of a class contained in that Ready4Module's slots.
A ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method or an instance of a class contained in that Ready4Module's slots.
X <- Ready4Module() procureSlot(X, "dissemination_1L_chr")
X <- Ready4Module() procureSlot(X, "dissemination_1L_chr")
prognosticate() is a method that applies an algorithm to data contained in a model module to solve a forward problem (i.e., use simulation and statistical methods to make predictions).
prognosticate(x, ...)
prognosticate(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module).
prognosticateSlot() is a convenience method that applies the prognosticate method to a specified slot of a model module.
prognosticateSlot method applied to Ready4Module
prognosticateSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' prognosticateSlot(x, slot_nm_1L_chr, ...)
prognosticateSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' prognosticateSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module).
A ready4 model module (an instance of a class that inherits from Ready4Module).
ratify() is a method that validates that a model module or submodule conforms to specified internal consistency criteria, potentially updating the invalid values in the model module so that these criteria are met.
ratify(x, ...)
ratify(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method.
ratifySlot() is a convenience method that applies the ratify method to a specified slot of a model module.
ratifySlot method applied to Ready4Module
ratifySlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' ratifySlot(x, slot_nm_1L_chr, ...)
ratifySlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' ratifySlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
A ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
A module of the ready4 representational system.
dissemination_1L_chr
Dissemination (a character vector of length one)
A module of the ready4 representational system that contains data not intended for public dissemination.
dissemination_1L_chr
Dissemination (a character vector of length one)
A virtual class denoting a module of the ready4 representational system hat is suitable for public dissemination in its current form.
dissemination_1L_chr
Dissemination (a character vector of length one)
reckon() is a method that performs a calculation using data contained in a model module (or sub-module).
reckon(x, ...)
reckon(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A numeric class.
reckonSlot() is a convenience method that applies the reckon method to a specified slot of a model module.
reckonSlot method applied to Ready4Module
reckonSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' reckonSlot(x, slot_nm_1L_chr, ...)
reckonSlot(x, slot_nm_1L_chr, ...) ## S4 method for signature 'Ready4Module' reckonSlot(x, slot_nm_1L_chr, ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
... |
Additional arguments |
A numeric class.
A numeric class.
renew() is a "setter" method that updates values of selected data contained in a model module or sub-module.
renew(x, ...)
renew(x, ...)
x |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance) of the same class as that supplied to the method.
renewSlot() is a "setter" method that renews (sets) the value of a specified model module slot with either the value returned by applying the renew method to that slot (the default behaviour) or a supplied new value.
renewSlot method applied to Ready4Module
renewSlot(x, slot_nm_1L_chr, new_val_xx = "use_renew_mthd", ...) ## S4 method for signature 'Ready4Module' renewSlot(x, slot_nm_1L_chr, new_val_xx = "use_renew_mthd", ...)
renewSlot(x, slot_nm_1L_chr, new_val_xx = "use_renew_mthd", ...) ## S4 method for signature 'Ready4Module' renewSlot(x, slot_nm_1L_chr, new_val_xx = "use_renew_mthd", ...)
x |
An object of class Ready4Module |
slot_nm_1L_chr |
Slot name (a length one character vector) |
new_val_xx |
New value (slot dependent object type), Default 'use_renew_mthd' |
... |
Additional arguments |
A model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
A ready4 model module (an instance of a class that inherits from Ready4Module) of the same class as that supplied to the method.
X <- Ready4Module() X <- renewSlot(X, "dissemination_1L_chr", new_val_xx = "Some new text.")
X <- Ready4Module() X <- renewSlot(X, "dissemination_1L_chr", new_val_xx = "Some new text.")
write_to_copy_rmds() is used to copy template RMD or Rmarkdown files to specified sub-directories of a model documentation website. These template copies can then be manually edited before being rendered with write_to_render_post().
write_to_copy_rmds( dir_path_1L_chr, fl_nm_1L_chr, consent_1L_chr = "", rmds_dir_1L_chr = "R/RMD Templates", consent_indcs_int = 1L, options_chr = c("Y", "N"), return_1L_lgl = FALSE )
write_to_copy_rmds( dir_path_1L_chr, fl_nm_1L_chr, consent_1L_chr = "", rmds_dir_1L_chr = "R/RMD Templates", consent_indcs_int = 1L, options_chr = c("Y", "N"), return_1L_lgl = FALSE )
dir_path_1L_chr |
Directory path (a character vector of length one) |
fl_nm_1L_chr |
File name (a character vector of length one) |
consent_1L_chr |
Consent (a character vector of length one), Default: ” |
rmds_dir_1L_chr |
R Markdowns directory (a character vector of length one), Default: 'R/RMD Templates' |
consent_indcs_int |
Consent indices (an integer vector), Default: 1 |
options_chr |
Options (a character vector), Default: c("Y", "N") |
return_1L_lgl |
Return (a logical vector of length one), Default: FALSE |
No return value, called for side effects.
write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "RMDs", rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4"))
write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "RMDs", rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4"))
write_to_render_post() is designed for help overcome practical challenges of rendering RMD or Rmarkdown files to Markdown output in a modelling project's Hugo Docsy documentation website. You must have 'hugodown' installed for this function to work.
write_to_render_post( included_dirs_chr, path_to_main_dir_1L_chr, consent_1L_chr = "", consent_indcs_int = 1L, is_rmd_1L_lgl = TRUE, options_chr = c("Y", "N") )
write_to_render_post( included_dirs_chr, path_to_main_dir_1L_chr, consent_1L_chr = "", consent_indcs_int = 1L, is_rmd_1L_lgl = TRUE, options_chr = c("Y", "N") )
included_dirs_chr |
Included directories (a character vector) |
path_to_main_dir_1L_chr |
Path to main directory (a character vector of length one) |
consent_1L_chr |
Consent (a character vector of length one), Default: ” |
consent_indcs_int |
Consent indices (an integer vector), Default: 1 |
is_rmd_1L_lgl |
Is Markdown (a logical vector of length one), Default: TRUE |
options_chr |
Options (a character vector), Default: c("Y", "N") |
No return value, called for side effects.
# Note, In addition to rmarkdown, the non CRAN package "hugodown" is also required. if(requireNamespace("rmarkdown", quietly = TRUE)) { # Example 1 - RMD files # # Copy template RMD files write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "RMDs", rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4")) # Typically you would now edit these templates before proceeding. # Render post from RMD files. write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir()) # # Example 2 - Rmarkdown file # # Copy template Rmarkdown file write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "Rmarkdown", rmds_dir_1L_chr = system.file("MD_Rmarkdown", package = "ready4")) # Typically you would now edit these templates before proceeding. # Render post from RMD files. write_to_render_post("Rmarkdown", path_to_main_dir_1L_chr = tempdir(), is_rmd_1L_lgl = F) }
# Note, In addition to rmarkdown, the non CRAN package "hugodown" is also required. if(requireNamespace("rmarkdown", quietly = TRUE)) { # Example 1 - RMD files # # Copy template RMD files write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "RMDs", rmds_dir_1L_chr = system.file("MD_RMDs", package = "ready4")) # Typically you would now edit these templates before proceeding. # Render post from RMD files. write_to_render_post("RMDs", path_to_main_dir_1L_chr = tempdir()) # # Example 2 - Rmarkdown file # # Copy template Rmarkdown file write_to_copy_rmds(dir_path_1L_chr = tempdir(), fl_nm_1L_chr = "Rmarkdown", rmds_dir_1L_chr = system.file("MD_Rmarkdown", package = "ready4")) # Typically you would now edit these templates before proceeding. # Render post from RMD files. write_to_render_post("Rmarkdown", path_to_main_dir_1L_chr = tempdir(), is_rmd_1L_lgl = F) }
write_ws() creates a standardised directory structure as a local development environment for modelling projects developed with the ready4 framework.
write_ws( path_1L_chr, consent_1L_chr = "", consent_indcs_int = 1L, options_chr = c("Y", "N") )
write_ws( path_1L_chr, consent_1L_chr = "", consent_indcs_int = 1L, options_chr = c("Y", "N") )
path_1L_chr |
Path (a character vector of length one) |
consent_1L_chr |
Consent (a character vector of length one), Default: ” |
consent_indcs_int |
Consent indices (an integer vector), Default: 1 |
options_chr |
Options (a character vector), Default: c("Y", "N") |
No return value, called for side effects.
write_ws(tempdir())
write_ws(tempdir())