Title: Develop and Use Modular Health Economic Models
Version: 0.1.18
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>.
License: GPL-3
URL: https://ready4-dev.github.io/ready4/, https://github.com/ready4-dev/ready4, https://www.ready4-dev.com/
Encoding: UTF-8
RoxygenNote: 7.3.2
Collate: 'C4_Ready4Module.R' 'C4_Ready4Private.R' 'C4_Ready4Public.R' 'fn_add.R' 'fn_bind.R' 'fn_get.R' 'fn_make.R' 'fn_print.R' 'fn_remove.R' 'fn_rowbind.R' 'fn_transform.R' 'fn_update.R' 'fn_write.R' 'grp_generics.R' 'imp_fns.R' 'imp_mthds.R' 'mthd_authorSlot.R' 'mthd_characterizeSlot.R' 'mthd_depictSlot.R' 'mthd_enhanceSlot.R' 'mthd_exhibitSlot.R' 'mthd_ingestSlot.R' 'mthd_investigateSlot.R' 'mthd_manufactureSlot.R' 'mthd_metamorphoseSlot.R' 'mthd_procureSlot.R' 'mthd_prognosticateSlot.R' 'mthd_ratifySlot.R' 'mthd_reckonSlot.R' 'mthd_renewSlot.R' 'mthd_shareSlot.R' 'pkg_ready4.R' 'ready4-package.R'
Suggests: devtools, Hmisc, knitr, pkgload, readr, readxl, rmarkdown, testthat, usethis, zen4R
VignetteBuilder: knitr
Imports: curl, dataverse, dplyr, gh, kableExtra, lifecycle, magrittr, methods, piggyback, purrr, rlang, rvest, stats, stringi, stringr, tibble, tidyRSS, tidyselect, tools, utils
Language: en-AU
NeedsCompilation: no
Packaged: 2024-09-30 02:48:40 UTC; mham0053
Author: Matthew Hamilton ORCID iD [aut, cre, cph], Orygen [cph, fnd], Australian Government Research Training Program [fnd], VicHealth [fnd], Victoria University [fnd]
Maintainer: Matthew Hamilton <matthew.hamilton1@monash.edu>
Repository: CRAN
Date/Publication: 2024-09-30 07:10:02 UTC

ready4: Develop and Use Modular Health Economic Models

Description

logo

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.

logo

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.

Author(s)

Maintainer: Matthew Hamilton matthew.hamilton1@monash.edu (ORCID) [copyright holder]

Other contributors:

See Also

Useful links:

Useful links:


Pipe operator

Description

Import of magrittr::%>%(). See magrittr package documentation for detailed description.

Value

The type of return from this function depends on the left hand side and right hand side arguments supplied to it. In principle, any type of returned object is feasible.

See Also

magrittr::%>%()


Dot Data function

Description

Import of rlang::.data(). See rlang package documentation for detailed description.

Value

Does not return a value. A pronoun for use in data-masked functions.

See Also

rlang::.data()


Non standard evaluation assignment function

Description

Import of := function, implementing rlang::dyn-dots(). See rlang package documentation for detailed description.

Value

Does not return a value. Used to implement non standard evaluation within a dynamic dots context.

See Also

rlang::dyn-dots()


Ready4Module

Description

A module of the ready4 representational system.

Slots

dissemination_1L_chr

Dissemination (a character vector of length one)


Ready4Private

Description

A module of the ready4 representational system that contains data not intended for public dissemination.

Slots

dissemination_1L_chr

Dissemination (a character vector of length one)


Ready4Public

Description

A virtual class denoting a module of the ready4 representational system hat is suitable for public dissemination in its current form.

Slots

dissemination_1L_chr

Dissemination (a character vector of length one)


Add lookup tables

Description

add_lups() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add lookup tables. The function is called for its side effects and does not return a value.

Usage

add_lups(
  template_lup,
  new_lup,
  key_var_nm_1L_chr,
  priority_lup_for_dupls_1L_chr = "template"
)

Arguments

template_lup

Template (a lookup table)

new_lup

New (a lookup table)

key_var_nm_1L_chr

Key variable name (a character vector of length one)

priority_lup_for_dupls_1L_chr

Priority lookup table for duplicates (a character vector of length one), Default: 'template'

Value

Combined (lookup tables)

See Also

Hmisc::label()


Add references

Description

add_references() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add references. The function returns Dataset (a tibble).

Usage

add_references(
  ds_tb,
  data_var_nm_1L_chr = "URL",
  data_url_var_nm_1L_chr = "REF_URL",
  reference_var_nm_1L_chr = "Reference"
)

Arguments

ds_tb

Dataset (a tibble)

data_var_nm_1L_chr

Data variable name (a character vector of length one), Default: 'URL'

data_url_var_nm_1L_chr

Data url variable name (a character vector of length one), Default: 'REF_URL'

reference_var_nm_1L_chr

Reference variable name (a character vector of length one), Default: 'Reference'

Value

Dataset (a tibble)


Add rows from function arguments

Description

add_rows_from_fn_args() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add rows from function arguments. The function returns Table (a ready4 submodule).

Usage

add_rows_from_fn_args(tbl_r3, fn, fn_env_ls)

Arguments

tbl_r3

Table (a ready4 submodule)

fn

Function (a function)

fn_env_ls

Function (a list of environments)

Value

Table (a ready4 submodule)

See Also

Hmisc::label()


Add scroll box

Description

add_scroll_box() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add scroll box. The function is called for its side effects and does not return a value.

Usage

add_scroll_box(
  table_kbl,
  scroll_height_1L_chr = character(0),
  scroll_width_1L_chr = character(0),
  ...
)

Arguments

table_kbl

PARAM_DESCRIPTION

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

Value

Table (a kable)


Description

add_vignette_links() is an Add function that updates an object by adding new values to new or empty fields. Specifically, this function implements an algorithm to add vignette links. The function returns Package extensions (a tibble).

Usage

add_vignette_links(
  pkg_extensions_tb,
  ns_var_nm_1L_chr = "pt_ns_chr",
  reference_var_nm_1L_chr = "Reference",
  url_stub_1L_chr = "https://ready4-dev.github.io/",
  vignette_var_nm_1L_chr = "Vignettes",
  vignette_url_var_nm_1L_chr = "Vignettes_URLs"
)

Arguments

pkg_extensions_tb

Package extensions (a tibble)

ns_var_nm_1L_chr

Namespace variable name (a character vector of length one), Default: 'pt_ns_chr'

reference_var_nm_1L_chr

Reference variable name (a character vector of length one), Default: 'Reference'

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'

Value

Package extensions (a tibble)


Author and save files

Description

author() is a method that authors and saves files.

Usage

author(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Author and document classes

Description

authorClasses() is a method that authors and saves R package files for creating and documenting classes to describe the data structures of model modules.

Usage

authorClasses(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Author and document datasets

Description

authorData() is a method that authors, documents and saves model module datasets.

Usage

authorData(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Author and document functions

Description

authorFunctions() is a method that authors and saves R package files files necessary for creating and documenting functions that implement model module algorithms.

Usage

authorFunctions(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Author and save a report

Description

authorReport() is a method that authors and saves a report.

Usage

authorReport(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Apply the author method to a model module slot

Description

authorSlot() is a convenience method that applies the author method to a specified slot of a model module.

authorSlot method applied to Ready4Module

Usage

authorSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
authorSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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).


Bind tables from local files

Description

bind_tables_from_loc_files() is a Bind function that binds two objects together to create a composite object. Specifically, this function implements an algorithm to bind tables from local files. The function returns Table (an output object of multiple potential types).

Usage

bind_tables_from_loc_files(
  paths_chr,
  force_numeric_1L_lgl = FALSE,
  force_tb_1L_lgl = FALSE,
  heading_rows_1L_int = 1L
)

Arguments

paths_chr

Paths (a character vector)

force_numeric_1L_lgl

Force numeric (a logical vector of length one), Default: FALSE

force_tb_1L_lgl

Force tibble (a logical vector of length one), Default: FALSE

heading_rows_1L_int

Heading rows (an integer vector of length one), Default: 1

Value

Table (an output object of multiple potential types)


Characterize model module data by generating (tabular) descriptive statistics

Description

characterize() is a method that generates descriptive tabular summaries about data contained in a model module.

Usage

characterize(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A data.frame, tibble or other table based class.


Apply the characterize method to a model module slot

Description

characterizeSlot() is a convenience method that applies the characterize method to a specified slot of a model module.

characterizeSlot method applied to Ready4Module

Usage

characterizeSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
characterizeSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 (plot) features of model module data

Description

depict() is a method that plots features of data contained in a model module (or sub-module).

Usage

depict(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A ggplot, gg or other plot type class.


Apply the depict method to a model module slot

Description

depictSlot() is a convenience method that applies the depict method to a specified slot of a model module.

depictSlot method applied to Ready4Module

Usage

depictSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
depictSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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).


Deprecated function

Description

Import of lifecycle::deprecated(). See lifecycle package documentation for detailed description.

Value

Does not return a value as the function is used to signal that a function argument has been deprecated.

See Also

lifecycle::deprecated()


Enhance a model module by adding new elements

Description

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.

Usage

enhance(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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.


Apply the enhance method to a model module slot

Description

enhanceSlot() is a convenience method that applies the enhance method to a specified slot a model module.

enhanceSlot method applied to Ready4Module

Usage

enhanceSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
enhanceSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 features of model module data by printing them to the R console

Description

exhibit() is a method that prints to console selected features of data contained in a model module.

Usage

exhibit(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Apply the exhibit method to a model module slot

Description

exhibitSlot() is a convenience method that applies the exhibit method to a specified slot a model module.

exhibitSlot method applied to Ready4Module

Usage

exhibitSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
exhibitSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 badge urls

Description

get_badge_urls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get badge urls. The function returns Badge urls (a list).

Usage

get_badge_urls(
  pkg_nm_1L_chr,
  project_badges_url_1L_chr = "https://img.shields.io/badge/ready4",
  url_stub_1L_chr = "https://ready4-dev.github.io/"
)

Arguments

pkg_nm_1L_chr

Package name (a character vector of length one)

project_badges_url_1L_chr

Project badges url (a character vector of length one), Default: 'https://img.shields.io/badge/ready4'

url_stub_1L_chr

Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/'

Value

Badge urls (a list)


Get badges lookup table

Description

get_badges_lup() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get badges lookup table. The function returns Ready4 badges (a lookup table).

Usage

get_badges_lup(
  ends_with_1L_chr = "ready4_badges_lup.RDS",
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

ends_with_1L_chr

Ends with (a character vector of length one), Default: 'ready4_badges_lup.RDS'

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'

Value

Ready4 badges (a lookup table)


Get class extensions

Description

get_cls_extensions() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get class extensions. The function returns Class extensions (a tibble).

Usage

get_cls_extensions(
  pkg_extensions_tb,
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  url_stub_1L_chr = "https://ready4-dev.github.io/",
  validate_1L_lgl = FALSE
)

Arguments

pkg_extensions_tb

Package extensions (a tibble)

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'

url_stub_1L_chr

Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/'

validate_1L_lgl

Validate (a logical vector of length one), Default: FALSE

Value

Class extensions (a tibble)


Get datasets tibble

Description

get_datasets_tb() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get datasets tibble. The function returns Datasets (a tibble).

Usage

get_datasets_tb(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  rds_fl_name_1L_chr = "datasets_tb"
)

Arguments

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'

rds_fl_name_1L_chr

Rds file name (a character vector of length one), Default: 'datasets_tb'

Value

Datasets (a tibble)

Examples

get_datasets_tb("ready4-dev/ready4")

Get digits from text

Description

get_digits_from_text() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get digits from text. The function returns Digits (a character vector).

Usage

get_digits_from_text(text_1L_chr)

Arguments

text_1L_chr

Text (a character vector of length one)

Value

Digits (a character vector)


Get dataverse files urls

Description

get_dv_fls_urls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get dataverse files urls. The function returns Urls (a character vector).

Usage

get_dv_fls_urls(
  file_nms_chr,
  dv_ds_nm_1L_chr,
  dv_url_pfx_1L_chr = character(0),
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER"),
  key_1L_chr = NULL
)

Arguments

file_nms_chr

File names (a character vector)

dv_ds_nm_1L_chr

Dataverse dataset name (a character vector of length one)

dv_url_pfx_1L_chr

Dataverse url prefix (a character vector of length one), Default: character(0)

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

key_1L_chr

Key (a character vector of length one), Default: NULL

Value

Urls (a character vector)


Get examples

Description

get_examples() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get examples. The function returns Examples (a character vector).

Usage

get_examples(vignettes_chr, term_1L_chr)

Arguments

vignettes_chr

Vignettes (a character vector)

term_1L_chr

Term (a character vector of length one)

Value

Examples (a character vector)


Get excluded repositories

Description

get_excluded_repos() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get excluded repositories. The function returns Exclude (a character vector).

Usage

get_excluded_repos(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Exclude (a character vector)


Get file extension

Description

get_fl_extension() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get file extension. The function returns Extension (a character vector of length one).

Usage

get_fl_extension(path_1L_chr)

Arguments

path_1L_chr

Path (a character vector of length one)

Value

Extension (a character vector of length one)


Get file identity from dataverse list

Description

get_fl_id_from_dv_ls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get file identity from dataverse list. The function returns Identity (a character vector of length one).

Usage

get_fl_id_from_dv_ls(ds_ls, fl_nm_1L_chr, nms_chr = NA_character_)

Arguments

ds_ls

Dataset (a list)

fl_nm_1L_chr

File name (a character vector of length one)

nms_chr

Names (a character vector), Default: 'NA'

Value

Identity (a character vector of length one)


Get file name from path

Description

get_fl_nm_from_path() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get file name from path. The function returns File name (a character vector of length one).

Usage

get_fl_nm_from_path(path_1L_chr)

Arguments

path_1L_chr

Path (a character vector of length one)

Value

File name (a character vector of length one)


Get a value from a lookup table

Description

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.

Usage

get_from_lup_obj(
  data_lookup_tb,
  match_value_xx,
  match_var_nm_1L_chr,
  target_var_nm_1L_chr,
  evaluate_1L_lgl = FALSE
)

Arguments

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

Value

Cell value (an output object of multiple potential types)

Examples

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 functions tibble

Description

get_functions_tb() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get functions tibble. The function returns Functions (a tibble).

Usage

get_functions_tb(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  return_1L_chr = "all"
)

Arguments

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'

return_1L_chr

Return (a character vector of length one), Default: 'all'

Value

Functions (a tibble)


Get generics

Description

get_generics() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get generics. The function returns Generics (a character vector).

Usage

get_generics(
  pkg_nm_1L_chr = "ready4",
  return_1L_chr = "all",
  exclude_mthds_for_chr = NA_character_,
  framework_only_1L_lgl = TRUE
)

Arguments

pkg_nm_1L_chr

Package name (a character vector of length one), Default: 'ready4'

return_1L_chr

Return (a character vector of length one), Default: 'all'

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

Value

Generics (a character vector)


Get github repositories

Description

get_gh_repos() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get github repositories. The function returns Repositories (a character vector).

Usage

get_gh_repos(org_1L_chr)

Arguments

org_1L_chr

Organisation (a character vector of length one)

Value

Repositories (a character vector)


Get data from the internet with graceful failure

Description

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.

Usage

get_gracefully(
  url_1L_chr,
  args_ls = NULL,
  fn = readRDS,
  not_chr_1L_lgl = F,
  tests_chr = character(0)
)

Arguments

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)

Value

Object (an output object of multiple potential types)

Examples


  # 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 list

Description

get_libraries_ls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get libraries list. The function returns Libraries (a list).

Usage

get_libraries_ls(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Libraries (a list)


Get a table of ready4 libraries

Description

get_libraries_tb() retrieves a tabular summary of ready4 libraries that have been developed within a specified GitHub organisation.

Usage

get_libraries_tb(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Libraries (a tibble)

Examples

get_libraries_tb("ready4-dev/ready4")

Get manual urls

Description

get_manual_urls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get manual urls. The function returns Urls (a character vector).

Usage

get_manual_urls(
  pkg_nm_1L_chr = "ready4",
  pkg_url_1L_chr = "https://ready4-dev.github.io/ready4/index.html"
)

Arguments

pkg_nm_1L_chr

Package name (a character vector of length one), Default: 'ready4'

pkg_url_1L_chr

Package url (a character vector of length one), Default: 'https://ready4-dev.github.io/ready4/index.html'

Value

Urls (a character vector)


Get the methods associated with a ready4 model module

Description

get_methods() retrieves the ready4 methods that are available for a specified ready4 model module.

Usage

get_methods(pkg_nm_1L_chr = "ready4", cls_nm_1L_chr = "Ready4Module")

Arguments

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'

Value

Methods (a character vector)

Examples

get_methods()

Get a table of methods associated with ready4 model modules

Description

get_methods_tb() ingests 'methods_tb.RDS' (a table of methods associated with ready4 model modules) from a specified GitHub repository release.

Usage

get_methods_tb(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Methods (a tibble)

Examples

get_methods_tb("ready4-dev/ready4")

Get a table of ready4 model modules

Description

get_modules_tb() ingests 'modules_tb.RDS' (a table of ready4 model modules) from a specified GitHub repository release.

Usage

get_modules_tb(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Modules (a tibble)

Examples

get_modules_tb("ready4-dev/ready4")

Get method titles

Description

get_mthd_titles() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get method titles. The function returns Method titles (a character vector).

Usage

get_mthd_titles(
  mthd_nms_chr,
  pkg_nm_1L_chr = "ready4",
  path_1L_chr = character(0)
)

Arguments

mthd_nms_chr

Method names (a character vector)

pkg_nm_1L_chr

Package name (a character vector of length one), Default: 'ready4'

path_1L_chr

Path (a character vector of length one), Default: character(0)

Value

Method titles (a character vector)


Get ready4 module object slots

Description

get_r4_obj_slots() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get ready4 module object slots. The function returns Slots (a character vector).

Usage

get_r4_obj_slots(fn_name_1L_chr, package_1L_chr = "")

Arguments

fn_name_1L_chr

Function name (a character vector of length one)

package_1L_chr

Package (a character vector of length one), Default: ”

Value

Slots (a character vector)


Get rds from dataverse

Description

get_rds_from_dv() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get rds from dataverse. The function returns R object (an output object of multiple potential types).

Usage

get_rds_from_dv(
  file_nm_1L_chr,
  dv_ds_nm_1L_chr = "https://doi.org/10.7910/DVN/RIQTKK",
  dv_url_pfx_1L_chr = character(0),
  key_1L_chr = NULL,
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

file_nm_1L_chr

File name (a character vector of length one)

dv_ds_nm_1L_chr

Dataverse dataset name (a character vector of length one), Default: 'https://doi.org/10.7910/DVN/RIQTKK'

dv_url_pfx_1L_chr

Dataverse url prefix (a character vector of length one), Default: character(0)

key_1L_chr

Key (a character vector of length one), Default: NULL

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

R object (an output object of multiple potential types)


Get source code urls

Description

get_source_code_urls() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get source code urls. The function returns Urls (a character vector).

Usage

get_source_code_urls(
  pkg_nm_1L_chr = "ready4",
  pkg_url_1L_chr = "https://ready4-dev.github.io/ready4/index.html"
)

Arguments

pkg_nm_1L_chr

Package name (a character vector of length one), Default: 'ready4'

pkg_url_1L_chr

Package url (a character vector of length one), Default: 'https://ready4-dev.github.io/ready4/index.html'

Value

Urls (a character vector)


Get subroutine repositories

Description

get_subroutine_repos() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get subroutine repositories. The function returns Subroutine repositories (a character vector).

Usage

get_subroutine_repos(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Subroutine repositories (a character vector)


Get table from local file

Description

get_table_from_loc_file() is a Get function that extracts data from an object. Specifically, this function implements an algorithm to get table from local file. The function returns Table (an output object of multiple potential types).

Usage

get_table_from_loc_file(
  path_1L_chr,
  force_numeric_1L_lgl = FALSE,
  force_tb_1L_lgl = FALSE,
  heading_rows_1L_int = 1L
)

Arguments

path_1L_chr

Path (a character vector of length one)

force_numeric_1L_lgl

Force numeric (a logical vector of length one), Default: FALSE

force_tb_1L_lgl

Force tibble (a logical vector of length one), Default: FALSE

heading_rows_1L_int

Heading rows (an integer vector of length one), Default: 1

Value

Table (an output object of multiple potential types)

See Also

readr::read_csv()

readxl::read_excel() and readxl::read_xlsx()


Ingest data

Description

ingest() is a method that ingests data saved in external files into a model module or submodule.

Usage

ingest(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance).


Apply the ingest method to a model module slot

Description

ingestSlot() is a convenience method that applies the ingest method to a specified slot of a model module.

ingestSlot method applied to Ready4Module

Usage

ingestSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
ingestSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 solutions to an inverse problem

Description

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).

Usage

investigate(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance).


Apply the investigate method to a model module slot

Description

investigateSlot() is a convenience method that applies the investigate method to a specified slot of a model module.

investigateSlot method applied to Ready4Module

Usage

investigateSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
investigateSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 additions tibble

Description

make_additions_tb() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make additions tibble. The function returns Additions (a tibble).

Usage

make_additions_tb(
  category_chr = character(0),
  library_chr = character(0),
  type_chr = character(0),
  url_stub_1L_chr = "https://ready4-dev.github.io/"
)

Arguments

category_chr

Category (a character vector), Default: character(0)

library_chr

Library (a character vector), Default: character(0)

type_chr

Type (a character vector), Default: character(0)

url_stub_1L_chr

Url stub (a character vector of length one), Default: 'https://ready4-dev.github.io/'

Value

Additions (a tibble)


Make a tabular summary of release history of ready4 code libraries and executables

Description

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.

Usage

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/",
  ...
)

Arguments

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

Value

Releases (an output object of multiple potential types)

Examples


  # 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 a tabular summary of ready4 model data collections

Description

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.

Usage

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"
)

Arguments

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'

Value

Datasets (a tibble)

Examples


  # 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 a tabular summary of release history of ready4 model data collections

Description

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.

Usage

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,
  ...
)

Arguments

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

Value

Dataset releases (an output object of multiple potential types)

Examples

make_ds_releases_tbl("10.7910/DVN/RIQTKK", as_kbl_1L_lgl = FALSE)

Make datasets tibble

Description

make_dss_tb() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make datasets tibble. The function returns Datasets (a tibble).

Usage

make_dss_tb(
  dvs_tb,
  filter_cdns_ls = list(),
  toy_data_dv_1L_chr = "fakes",
  what_1L_chr = "all"
)

Arguments

dvs_tb

Dataverses (a tibble)

filter_cdns_ls

Filter conditions (a list), Default: list()

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'

Value

Datasets (a tibble)


Make files tibble

Description

make_files_tb() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make files tibble. The function returns Files (a tibble).

Usage

make_files_tb(paths_to_dirs_chr, recode_ls, inc_fl_types_chr = NA_character_)

Arguments

paths_to_dirs_chr

Paths to directories (a character vector)

recode_ls

Recode (a list)

inc_fl_types_chr

Include file types (a character vector), Default: 'NA'

Value

Files (a tibble)


Make function defaults list

Description

make_fn_defaults_ls() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make function defaults list. The function returns Function defaults (a list).

Usage

make_fn_defaults_ls(fn)

Arguments

fn

Function (a function)

Value

Function defaults (a list)


Make framework packages character vector

Description

make_framework_pkgs_chr() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make framework packages character vector. The function returns Framework packages (a character vector).

Usage

make_framework_pkgs_chr(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0"
)

Arguments

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'

Value

Framework packages (a character vector)


Make libraries list

Description

make_libraries_ls() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make libraries list. The function returns Libraries (a list).

Usage

make_libraries_ls(
  additions_tb = make_additions_tb(),
  libraries_tb = NULL,
  ns_var_nm_1L_chr = "pt_ns_chr"
)

Arguments

additions_tb

Additions (a tibble), Default: make_additions_tb()

libraries_tb

Libraries (a tibble), Default: NULL

ns_var_nm_1L_chr

Namespace variable name (a character vector of length one), Default: 'pt_ns_chr'

Value

Libraries (a list)


Make libraries tibble

Description

make_libraries_tb() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make libraries tibble. The function returns Libraries (a tibble).

Usage

make_libraries_tb(
  additions_tb = make_additions_tb(),
  include_1L_chr = "modules",
  module_pkgs_chr = character(0),
  ns_var_nm_1L_chr = "pt_ns_chr",
  reference_var_nm_1L_chr = "Reference",
  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"
)

Arguments

additions_tb

Additions (a tibble), Default: make_additions_tb()

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'

reference_var_nm_1L_chr

Reference variable name (a character vector of length one), Default: 'Reference'

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'

Value

Libraries (a tibble)


Make list phrase

Description

make_list_phrase() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make list phrase. The function returns List phrase (a character vector of length one).

Usage

make_list_phrase(items_chr)

Arguments

items_chr

Items (a character vector)

Value

List phrase (a character vector of length one)


Make local path to dataverse data

Description

make_local_path_to_dv_data() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make local path to dataverse data. The function returns Path (a character vector).

Usage

make_local_path_to_dv_data(save_dir_path_1L_chr, fl_nm_1L_chr, save_fmt_1L_chr)

Arguments

save_dir_path_1L_chr

Save directory path (a character vector of length one)

fl_nm_1L_chr

File name (a character vector of length one)

save_fmt_1L_chr

Save format (a character vector of length one)

Value

Path (a character vector)


Make a tabular summary of methods associated with ready model modules

Description

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.

Usage

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"
)

Arguments

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'

Value

Methods (a tibble)

Examples


  # Likely to take more than one minute to execute.
  make_methods_tb(gh_repo_1L_chr = "ready4-dev/ready4")


Make modules packages character vector

Description

make_modules_pkgs_chr() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make modules packages character vector. The function returns Modules packages (a character vector).

Usage

make_modules_pkgs_chr(
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  sort_1L_lgl = FALSE,
  what_chr = "all"
)

Arguments

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'

sort_1L_lgl

Sort (a logical vector of length one), Default: FALSE

what_chr

What (a character vector), Default: 'all'

Value

Modules packages (a character vector)


Make a tabular summary of ready4 model modules and sub-modules

Description

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.

Usage

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"
)

Arguments

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'

Value

Modules (a tibble)

Examples


  # Likely to take more than one minute to execute.
  make_modules_tb(gh_repo_1L_chr = "ready4-dev/ready4")


Make a tabular summary of programs using ready4 model modules

Description

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.

Usage

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",
  ...
)

Arguments

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

Value

Programs (an output object of multiple potential types)

See Also

zen4R::ZenodoManager()

Examples


  # 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")
  }


Make prompt

Description

make_prompt() is a Make function that creates a new R object. Specifically, this function implements an algorithm to make prompt. The function returns Response (a character vector of length one).

Usage

make_prompt(prompt_1L_chr, options_chr = NULL, force_from_opts_1L_chr = FALSE)

Arguments

prompt_1L_chr

Prompt (a character vector of length one)

options_chr

Options (a character vector), Default: NULL

force_from_opts_1L_chr

Force from opts (a character vector of length one), Default: FALSE

Value

Response (a character vector of length one)


Manufacture a new object

Description

manufacture() is a method that used data contained in a model module or submodule to create a new object (other than a model module).

Usage

manufacture(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

An object other than a model module (an instance of a class that inherits from Ready4Module).


Apply the manufacture method to a model module slot

Description

manufactureSlot() is a convenience method that applies the manufacture method to a specified slot of a model module.

manufactureSlot method applied to Ready4Module

Usage

manufactureSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
manufactureSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 a model module to a model module of a different (non-inheriting) class

Description

metamorphose() is a method that transforms a model module into a model module of a different (non-inheriting) class.

Usage

metamorphose(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module)

...

Additional arguments

Value

A model module (an instance of a class that inherits from Ready4Module) of a different class to that supplied to the method.


Apply the metamorphose method to a model module slot

Description

metamorphoseSlot() is a convenience method that applies the metamorphose method to a specified slot of a model module.

metamorphoseSlot method applied to Ready4Module

Usage

metamorphoseSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
metamorphoseSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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).


Description

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.

Usage

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",
  ...
)

Arguments

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

Value

Datasets (a kable)

Examples

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")


Description

print_dss() is a Print function that prints output to console. Specifically, this function implements an algorithm to print datasets. The function is called for its side effects and does not return a value.

Usage

print_dss(
  datasets_tb,
  filter_cdns_ls = NULL,
  scroll_height_1L_chr = character(0),
  scroll_width_1L_chr = character(0),
  toy_data_dv_1L_chr = "fakes",
  what_1L_chr = "all",
  ...
)

Arguments

datasets_tb

Datasets (a tibble)

filter_cdns_ls

Filter conditions (a list), Default: NULL

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

Value

Datasets (a kable)


Description

print_dvs() is a Print function that prints output to console. Specifically, this function implements an algorithm to print dataverses. The function is called for its side effects and does not return a value.

Usage

print_dvs(
  dvs_tb,
  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",
  ...
)

Arguments

dvs_tb

Dataverses (a tibble)

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

Value

Dataverses (a kable)


Description

print_methods() formats the output of either get_methods_tb() or make_methods_tb() as HTML.

Usage

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),
  ...
)

Arguments

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

Value

Methods (a kable)

Examples

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")

Description

print_modules() formats the output of either get_modules_tb() or make_modules_tb() as HTML.

Usage

print_modules(
  modules_tb,
  scroll_height_1L_chr = character(0),
  scroll_width_1L_chr = character(0),
  what_1L_chr = "All",
  ...
)

Arguments

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

Value

Modules (a kable)

Examples

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")

Description

print_packages() formats the output of get_libraries_tb() as HTML.

Usage

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",
  ...
)

Arguments

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

Value

Package extensions (a kable)

Examples


  # 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")


Description

print_vignettes() is a Print function that prints output to console. Specifically, this function implements an algorithm to print vignettes. The function is called for its side effects and does not return a value.

Usage

print_vignettes(
  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",
  reference_var_nm_1L_chr = "Reference",
  scroll_height_1L_chr = character(0),
  scroll_width_1L_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",
  ...
)

Arguments

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'

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)

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

Value

Vignettes (a kable)


Procure data from a model module

Description

procure() is a "getter" method that retrieves data contained within a model module or sub-module.

Usage

procure(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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.


Procure (get) data from a slot

Description

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

Usage

procureSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
procureSlot(x, slot_nm_1L_chr, use_procure_mthd_1L_lgl = FALSE, ...)

Arguments

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)

Value

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.

Examples

X <- Ready4Module()
procureSlot(X, "dissemination_1L_chr")

Prognosticate (make predictions) by solving a forward problem

Description

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).

Usage

prognosticate(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A model module (an instance of a class that inherits from Ready4Module).


Apply the prognosticate method to a model module slot

Description

prognosticateSlot() is a convenience method that applies the prognosticate method to a specified slot of a model module.

prognosticateSlot method applied to Ready4Module

Usage

prognosticateSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
prognosticateSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 that input or output data meet validity criteria

Description

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.

Usage

ratify(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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.


Apply the ratify method to a model module slot

Description

ratifySlot() is a convenience method that applies the ratify method to a specified slot of a model module.

ratifySlot method applied to Ready4Module

Usage

ratifySlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
ratifySlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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.


Reckon (calculate) a value

Description

reckon() is a method that performs a calculation using data contained in a model module (or sub-module).

Usage

reckon(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

A numeric class.


Apply the reckon method to a model module slot

Description

reckonSlot() is a convenience method that applies the reckon method to a specified slot of a model module.

reckonSlot method applied to Ready4Module

Usage

reckonSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
reckonSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

A numeric class.

A numeric class.


Remove labels from dataframe

Description

remove_lbls_from_df() is a Remove function that edits an object, removing a specified element or elements. Specifically, this function implements an algorithm to remove labels from dataframe. The function returns Unlabelled data (a data.frame).

Usage

remove_lbls_from_df(data_df)

Arguments

data_df

Data (a data.frame)

Value

Unlabelled data (a data.frame)


Renew (update) values

Description

renew() is a "setter" method that updates values of selected data contained in a model module or sub-module.

Usage

renew(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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.


Renew (set) the values of data in a module slot

Description

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

Usage

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", ...)

Arguments

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

Value

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.

Examples

X <- Ready4Module()
X <- renewSlot(X, "dissemination_1L_chr", new_val_xx = "Some new text.")

Rowbind all tibbles in ready4 module object

Description

rowbind_all_tbs_in_r4_obj() is a Rowbind function that performs custom rowbind operations on table objects. Specifically, this function implements an algorithm to rowbind all tibbles in ready4 module object. The function returns Tibbles (a ready4 module).

Usage

rowbind_all_tbs_in_r4_obj(tbs_r4, second_tbs_r4, r4_name_1L_chr)

Arguments

tbs_r4

Tibbles (a ready4 module)

second_tbs_r4

Second tibbles (a ready4 module)

r4_name_1L_chr

Ready4 module name (a character vector of length one)

Value

Tibbles (a ready4 module)


Rowbind tibbles in ready4 module object

Description

rowbind_tbs_in_r4_obj() is a Rowbind function that performs custom rowbind operations on table objects. Specifically, this function implements an algorithm to rowbind tibbles in ready4 module object. The function returns Tibbles (a ready4 module).

Usage

rowbind_tbs_in_r4_obj(tbs_r4, slot_nm_1L_chr, second_tbs_r4, r4_name_1L_chr)

Arguments

tbs_r4

Tibbles (a ready4 module)

slot_nm_1L_chr

Slot name (a character vector of length one)

second_tbs_r4

Second tibbles (a ready4 module)

r4_name_1L_chr

Ready4 module name (a character vector of length one)

Value

Tibbles (a ready4 module)


Share data via an online repository

Description

share() is a method that uploads data contained in a model module to an online repository. If requested, the method will also publish the updated repository.

Usage

share(x, ...)

Arguments

x

A model module (an instance of a class that inherits from Ready4Module) or submodule (any S3 class instance)

...

Additional arguments

Value

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).


Apply the share method to a model module slot

Description

shareSlot() is a convenience method that applies the share method to a specified slot of a model module.

shareSlot method applied to Ready4Module

Usage

shareSlot(x, slot_nm_1L_chr, ...)

## S4 method for signature 'Ready4Module'
shareSlot(x, slot_nm_1L_chr, ...)

Arguments

x

An object of class Ready4Module

slot_nm_1L_chr

Slot name (a length one character vector)

...

Additional arguments

Value

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 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 value (when called purely for side effects).


Transform character vector to numeric

Description

transform_chr_to_num() is a Transform function that edits an object in such a way that core object attributes - e.g. shape, dimensions, elements, type - are altered. Specifically, this function implements an algorithm to transform character vector to numeric. The function returns Digits (an output object of multiple potential types).

Usage

transform_chr_to_num(digits_chr)

Arguments

digits_chr

Digits (a character vector)

Value

Digits (an output object of multiple potential types)


Transform class type list

Description

transform_cls_type_ls() is a Transform function that edits an object in such a way that core object attributes - e.g. shape, dimensions, elements, type - are altered. Specifically, this function implements an algorithm to transform class type list. The function returns Tfmd class type (a list).

Usage

transform_cls_type_ls(cls_type_ls)

Arguments

cls_type_ls

Class type (a list)

Value

Tfmd class type (a list)


Update libraries list

Description

update_libraries_ls() is an Update function that edits an object, while preserving core object attributes. Specifically, this function implements an algorithm to update libraries list. The function returns Libraries (a list).

Usage

update_libraries_ls(
  libraries_ls = NULL,
  additions_tb = make_additions_tb(),
  keep_chr = "all"
)

Arguments

libraries_ls

Libraries (a list), Default: NULL

additions_tb

Additions (a tibble), Default: make_additions_tb()

keep_chr

Keep (a character vector), Default: 'all'

Value

Libraries (a list)


Update libraries tibble

Description

update_libraries_tb() is an Update function that edits an object, while preserving core object attributes. Specifically, this function implements an algorithm to update libraries tibble. The function returns Libraries (a tibble).

Usage

update_libraries_tb(
  libraries_tb = make_libraries_tb(),
  additions_tb = make_additions_tb(),
  module_pkgs_chr = character(0),
  include_1L_chr = "all",
  ns_var_nm_1L_chr = "pt_ns_chr",
  reference_var_nm_1L_chr = "Reference",
  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"
)

Arguments

libraries_tb

Libraries (a tibble), Default: make_libraries_tb()

additions_tb

Additions (a tibble), Default: make_additions_tb()

module_pkgs_chr

Module packages (a character vector), Default: character(0)

include_1L_chr

Include (a character vector of length one), Default: 'all'

ns_var_nm_1L_chr

Namespace variable name (a character vector of length one), Default: 'pt_ns_chr'

reference_var_nm_1L_chr

Reference variable name (a character vector of length one), Default: 'Reference'

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'

Value

Libraries (a tibble)


Update prototype function arguments list

Description

update_pt_fn_args_ls() is an Update function that edits an object, while preserving core object attributes. Specifically, this function implements an algorithm to update prototype function arguments list. The function returns Updated arguments (a list).

Usage

update_pt_fn_args_ls(args_ls)

Arguments

args_ls

Arguments (a list)

Value

Updated arguments (a list)


Update tibble ready4 submodule

Description

update_tb_r3() is an Update function that edits an object, while preserving core object attributes. Specifically, this function implements an algorithm to update tibble ready4 submodule. The function returns Tibble ready4 submodule (a ready4 submodule extension of tibble).

Usage

update_tb_r3(
  tb_r3,
  case_when_false_1L_chr = NA_character_,
  case_when_true_1L_chr = NA_character_,
  case_when_true_ls = NULL,
  case_when_var_1L_chr = NA_character_,
  filter_cdn_1L_chr = NA_character_,
  fn = NULL,
  fn_env_ls = NULL,
  slice_indcs_int = NA_integer_,
  tf_false_val_1L_lgl = FALSE
)

Arguments

tb_r3

Tibble ready4 submodule (a ready4 submodule extension of tibble)

case_when_false_1L_chr

Case when false (a character vector of length one), Default: 'NA'

case_when_true_1L_chr

Case when true (a character vector of length one), Default: 'NA'

case_when_true_ls

Case when true (a list), Default: NULL

case_when_var_1L_chr

Case when variable (a character vector of length one), Default: 'NA'

filter_cdn_1L_chr

Filter condition (a character vector of length one), Default: 'NA'

fn

Function (a function), Default: NULL

fn_env_ls

Function (a list of environments), Default: NULL

slice_indcs_int

Slice indices (an integer vector), Default: NA

tf_false_val_1L_lgl

Transform false value (a logical vector of length one), Default: FALSE

Value

Tibble ready4 submodule (a ready4 submodule extension of tibble)


Write all tibbles in tibbles ready4 module to comma separated variables files

Description

write_all_tbs_in_tbs_r4_to_csvs() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write all tibbles in tibbles ready4 module to comma separated variables files. The function is called for its side effects and does not return a value.

Usage

write_all_tbs_in_tbs_r4_to_csvs(
  tbs_r4,
  r4_name_1L_chr,
  lup_dir_1L_chr,
  pfx_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

tbs_r4

Tibbles (a ready4 module)

r4_name_1L_chr

Ready4 module name (a character vector of length one)

lup_dir_1L_chr

Lookup table directory (a character vector of length one)

pfx_1L_chr

Prefix (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")

Value

No return value, called for side effects.


Write blog entries

Description

write_blog_entries() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write blog entries. The function is called for its side effects and does not return a value.

Usage

write_blog_entries(
  dir_path_1L_chr,
  fl_nm_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

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: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.

See Also

rmarkdown::render()


Write citation cff

Description

write_citation_cff() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write citation cff. The function is called for its side effects and does not return a value.

Usage

write_citation_cff(
  pkg_desc_ls,
  citation_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  publisher_1L_chr = "Zenodo"
)

Arguments

pkg_desc_ls

Package description (a list)

citation_chr

Citation (a character vector)

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")

publisher_1L_chr

Publisher (a character vector of length one), Default: 'Zenodo'

Value

No return value, called for side effects.


Write conditional tags

Description

write_conditional_tags() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write conditional tags. The function is called for its side effects and does not return a value.

Usage

write_conditional_tags(
  pkgs_chr,
  path_to_pkg_root_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  where_1L_chr = character(0)
)

Arguments

pkgs_chr

Packages (a character vector)

path_to_pkg_root_1L_chr

Path to package root (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")

where_1L_chr

Where (a character vector of length one), Default: character(0)

Value

No return value, called for side effects.

See Also

usethis::use_package()


Write dataverse file to local

Description

write_dv_fl_to_loc() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write dataverse file to local. The function is called for its side effects and does not return a value.

Usage

write_dv_fl_to_loc(
  ds_url_1L_chr = character(0),
  dest_path_1L_chr,
  repo_fl_fmt_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  fl_nm_1L_chr = NA_character_,
  fl_id_1L_int = NA_integer_,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  save_type_1L_chr = "original",
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER"),
  ds_ui_1L_chr = deprecated()
)

Arguments

ds_url_1L_chr

Dataset url (a character vector of length one), Default: character(0)

dest_path_1L_chr

Destination path (a character vector of length one)

repo_fl_fmt_1L_chr

Repository file format (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

fl_nm_1L_chr

File name (a character vector of length one), Default: 'NA'

fl_id_1L_int

File identity (an integer vector of length one), Default: NA

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

save_type_1L_chr

Save type (a character vector of length one), Default: 'original'

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

ds_ui_1L_chr

Dataset user interface (a character vector of length one), Default: deprecated()

Value

No return value, called for side effects.


Write environment objects to dataverse

Description

write_env_objs_to_dv() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write environment objects to dataverse. The function returns File identities (an integer vector).

Usage

write_env_objs_to_dv(
  env_objects_ls,
  descriptions_chr,
  ds_url_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  publish_dv_1L_lgl = FALSE,
  piggyback_desc_1L_chr = "Documentation",
  piggyback_tag_1L_chr = "Documentation_0.0",
  piggyback_to_1L_chr = character(0),
  prerelease_1L_lgl = TRUE,
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

env_objects_ls

Environment objects (a list)

descriptions_chr

Descriptions (a character vector)

ds_url_1L_chr

Dataset url (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

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

publish_dv_1L_lgl

Publish dataverse (a logical vector of length one), Default: FALSE

piggyback_desc_1L_chr

Piggyback description (a character vector of length one), Default: 'Documentation'

piggyback_tag_1L_chr

Piggyback tag (a character vector of length one), Default: 'Documentation_0.0'

piggyback_to_1L_chr

Piggyback to (a character vector of length one), Default: character(0)

prerelease_1L_lgl

Prerelease (a logical vector of length one), Default: TRUE

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

File identities (an integer vector)


Write examples

Description

write_examples() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write examples. The function is called for its side effects and does not return a value.

Usage

write_examples(
  path_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  type_1L_chr = "fn"
)

Arguments

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")

type_1L_chr

Type (a character vector of length one), Default: 'fn'

Value

No return value, called for side effects.

See Also

devtools::document()


Write extra packages to actions

Description

write_extra_pkgs_to_actions() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write extra packages to actions. The function is called for its side effects and does not return a value.

Usage

write_extra_pkgs_to_actions(
  path_to_dir_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

path_to_dir_1L_chr

Path to 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

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.


Write files from dataverse

Description

write_fls_from_dv() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write files from dataverse. The function is called for its side effects and does not return a value.

Usage

write_fls_from_dv(
  files_tb,
  fl_ids_int,
  ds_url_1L_chr,
  local_dv_dir_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

files_tb

Files (a tibble)

fl_ids_int

File identities (an integer vector)

ds_url_1L_chr

Dataset url (a character vector of length one)

local_dv_dir_1L_chr

Local dataverse 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

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

No return value, called for side effects.


Write files to dataverse

Description

write_fls_to_dv() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write files to dataverse. The function returns Identities (an integer vector).

Usage

write_fls_to_dv(
  file_paths_chr,
  ds_url_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  descriptions_chr = NULL,
  ds_ls = NULL,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

file_paths_chr

File paths (a character vector)

ds_url_1L_chr

Dataset url (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

descriptions_chr

Descriptions (a character vector), Default: NULL

ds_ls

Dataset (a list), Default: NULL

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

Identities (an integer vector)


Write files to repository

Description

write_fls_to_repo() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write files to repository. The function returns Identities (an integer vector).

Usage

write_fls_to_repo(
  paths_chr,
  descriptions_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  ds_url_1L_chr = character(0),
  ds_ls = NULL,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  piggyback_desc_1L_chr = "Documentation",
  piggyback_tag_1L_chr = "Documentation_0.0",
  piggyback_to_1L_chr = character(0),
  prerelease_1L_lgl = TRUE,
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

paths_chr

Paths (a character vector)

descriptions_chr

Descriptions (a character vector)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

ds_url_1L_chr

Dataset url (a character vector of length one), Default: character(0)

ds_ls

Dataset (a list), Default: NULL

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

piggyback_desc_1L_chr

Piggyback description (a character vector of length one), Default: 'Documentation'

piggyback_tag_1L_chr

Piggyback tag (a character vector of length one), Default: 'Documentation_0.0'

piggyback_to_1L_chr

Piggyback to (a character vector of length one), Default: character(0)

prerelease_1L_lgl

Prerelease (a logical vector of length one), Default: TRUE

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

Identities (an integer vector)


Write from temporary

Description

write_from_tmp() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write from temporary. The function is called for its side effects and does not return a value.

Usage

write_from_tmp(
  tmp_paths_chr,
  dest_paths_chr,
  args_ls_ls = list(NULL),
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  edit_fn_ls = list(NULL),
  options_chr = c("Y", "N")
)

Arguments

tmp_paths_chr

Temporary paths (a character vector)

dest_paths_chr

Destination paths (a character vector)

args_ls_ls

Arguments (a list of lists), Default: list(NULL)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

edit_fn_ls

Edit (a list of functions), Default: list(NULL)

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.


Write ingested dataverse file

Description

write_ingested_dv_fl() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write ingested dataverse file. The function is called for its side effects and does not return a value.

Usage

write_ingested_dv_fl(
  ds_url_1L_chr = character(0),
  dest_path_1L_chr,
  repo_fl_fmt_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  fl_nm_1L_chr = NA_character_,
  fl_id_1L_int = NA_integer_,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  save_type_1L_chr = "original",
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER"),
  ds_ui_1L_chr = deprecated()
)

Arguments

ds_url_1L_chr

Dataset url (a character vector of length one), Default: character(0)

dest_path_1L_chr

Destination path (a character vector of length one)

repo_fl_fmt_1L_chr

Repository file format (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

fl_nm_1L_chr

File name (a character vector of length one), Default: 'NA'

fl_id_1L_int

File identity (an integer vector of length one), Default: NA

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

save_type_1L_chr

Save type (a character vector of length one), Default: 'original'

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

ds_ui_1L_chr

Dataset user interface (a character vector of length one), Default: deprecated()

Value

No return value, called for side effects.


Write library metadata

Description

write_library_metadata() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write library metadata. The function is called for its side effects and does not return a value.

Usage

write_library_metadata(
  additions_tb = make_additions_tb(),
  libraries_ls = NULL,
  libraries_tb = NULL,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  exclude_mthds_for_chr = NA_character_,
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  include_1L_chr = "all",
  module_pkgs_chr = character(0),
  options_chr = c("Y", "N"),
  ns_var_nm_1L_chr = "pt_ns_chr",
  path_1L_chr = character(0),
  reference_var_nm_1L_chr = "Reference",
  return_1L_chr = "all",
  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"
)

Arguments

additions_tb

Additions (a tibble), Default: make_additions_tb()

libraries_ls

Libraries (a list), Default: NULL

libraries_tb

Libraries (a tibble), Default: NULL

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

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'

include_1L_chr

Include (a character vector of length one), Default: 'all'

module_pkgs_chr

Module packages (a character vector), Default: character(0)

options_chr

Options (a character vector), Default: c("Y", "N")

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)

reference_var_nm_1L_chr

Reference variable name (a character vector of length one), Default: 'Reference'

return_1L_chr

Return (a character vector of length one), Default: 'all'

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'

Value

No return value, called for side effects.


Write new credentials

Description

write_new_credentials() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write new credentials. The function is called for its side effects and does not return a value.

Usage

write_new_credentials(
  path_to_file_1L_chr,
  new_credentials_1L_chr,
  old_credentials_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

path_to_file_1L_chr

Path to file (a character vector of length one)

new_credentials_1L_chr

New credentials (a character vector of length one)

old_credentials_1L_chr

Old credentials (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")

Value

No return value, called for side effects.


Write new directories

Description

write_new_dirs() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write new directories. The function is called for its side effects and does not return a value.

Usage

write_new_dirs(
  new_dirs_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

new_dirs_chr

New directories (a character vector)

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")

Value

No return value, called for side effects.


Write new files

Description

write_new_files() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write new files. The function returns Object (an output object of multiple potential types).

Usage

write_new_files(
  paths_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  custom_write_ls = NULL,
  fl_nm_1L_chr = NULL,
  options_chr = c("Y", "N"),
  source_paths_ls = NULL,
  text_ls = NULL,
  return_1L_lgl = FALSE
)

Arguments

paths_chr

Paths (a character vector)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

custom_write_ls

Custom write (a list), Default: NULL

fl_nm_1L_chr

File name (a character vector of length one), Default: NULL

options_chr

Options (a character vector), Default: c("Y", "N")

source_paths_ls

Source paths (a list), Default: NULL

text_ls

Text (a list), Default: NULL

return_1L_lgl

Return (a logical vector of length one), Default: FALSE

Value

Object (an output object of multiple potential types)


Write object with prompt

Description

write_obj_with_prompt() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write object with prompt. The function is called for its side effects and does not return a value.

Usage

write_obj_with_prompt(
  object_xx,
  obj_nm_1L_chr,
  outp_dir_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  return_1L_lgl = FALSE
)

Arguments

object_xx

Object (an output object of multiple potential types)

obj_nm_1L_chr

Object name (a character vector of length one)

outp_dir_1L_chr

Output 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

options_chr

Options (a character vector), Default: c("Y", "N")

return_1L_lgl

Return (a logical vector of length one), Default: FALSE

Value

No return value, called for side effects.


Write project output directories

Description

write_prj_outp_dirs() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write project output directories. The function returns New paths (a list).

Usage

write_prj_outp_dirs(
  prj_dirs_chr,
  output_data_dir_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  paths_ls = NULL
)

Arguments

prj_dirs_chr

Project directories (a character vector)

output_data_dir_1L_chr

Output data 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

options_chr

Options (a character vector), Default: c("Y", "N")

paths_ls

Paths (a list), Default: NULL

Value

New paths (a list)


Write tibble to comma separated variables file

Description

write_tb_to_csv() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write tibble to comma separated variables file. The function is called for its side effects and does not return a value.

Usage

write_tb_to_csv(
  tbs_r4,
  slot_nm_1L_chr,
  r4_name_1L_chr,
  lup_dir_1L_chr,
  pfx_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

tbs_r4

Tibbles (a ready4 module)

slot_nm_1L_chr

Slot name (a character vector of length one)

r4_name_1L_chr

Ready4 module name (a character vector of length one)

lup_dir_1L_chr

Lookup table directory (a character vector of length one)

pfx_1L_chr

Prefix (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")

Value

No return value, called for side effects.


Write a local copy of RMD or Rmarkdown files

Description

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().

Usage

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
)

Arguments

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

Value

No return value, called for side effects.

Examples


  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 delete directories

Description

write_to_delete_dirs() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to delete directories. The function is called for its side effects and does not return a value.

Usage

write_to_delete_dirs(
  dir_paths_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

dir_paths_chr

Directory paths (a character vector)

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")

Value

No return value, called for side effects.


Write to delete files

Description

write_to_delete_fls() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to delete files. The function returns Object (an output object of multiple potential types).

Usage

write_to_delete_fls(
  file_paths_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  return_1L_lgl = FALSE
)

Arguments

file_paths_chr

File paths (a character vector)

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")

return_1L_lgl

Return (a logical vector of length one), Default: FALSE

Value

Object (an output object of multiple potential types)


Write to dataverse from table

Description

write_to_dv_from_tbl() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to dataverse from table. The function returns File identities (an integer vector).

Usage

write_to_dv_from_tbl(
  files_tb,
  ds_url_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  data_dir_rt_1L_chr = ".",
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  options_chr = c("Y", "N"),
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER")
)

Arguments

files_tb

Files (a tibble)

ds_url_1L_chr

Dataset url (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

data_dir_rt_1L_chr

Data directory root (a character vector of length one), Default: '.'

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

options_chr

Options (a character vector), Default: c("Y", "N")

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

Value

File identities (an integer vector)


Write to dataverse with wait

Description

write_to_dv_with_wait() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to dataverse with wait. The function returns Dataset (a list).

Usage

write_to_dv_with_wait(
  dss_tb,
  dv_nm_1L_chr,
  ds_url_1L_chr,
  parent_dv_dir_1L_chr,
  paths_to_dirs_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  make_local_copy_1L_lgl = FALSE,
  options_chr = c("Y", "N"),
  paths_are_rltv_1L_lgl = TRUE,
  inc_fl_types_chr = NA_character_,
  key_1L_chr = Sys.getenv("DATAVERSE_KEY"),
  server_1L_chr = Sys.getenv("DATAVERSE_SERVER"),
  wait_time_in_secs_int = 5L
)

Arguments

dss_tb

Datasets (a tibble)

dv_nm_1L_chr

Dataverse name (a character vector of length one)

ds_url_1L_chr

Dataset url (a character vector of length one)

parent_dv_dir_1L_chr

Parent dataverse directory (a character vector of length one)

paths_to_dirs_chr

Paths to directories (a character vector)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

make_local_copy_1L_lgl

Make local copy (a logical vector of length one), Default: FALSE

options_chr

Options (a character vector), Default: c("Y", "N")

paths_are_rltv_1L_lgl

Paths are relative (a logical vector of length one), Default: TRUE

inc_fl_types_chr

Include file types (a character vector), Default: 'NA'

key_1L_chr

Key (a character vector of length one), Default: Sys.getenv("DATAVERSE_KEY")

server_1L_chr

Server (a character vector of length one), Default: Sys.getenv("DATAVERSE_SERVER")

wait_time_in_secs_int

Wait time in secs (an integer vector), Default: 5

Value

Dataset (a list)


Write to edit workflow

Description

write_to_edit_workflow() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to edit workflow. The function is called for its side effects and does not return a value.

Usage

write_to_edit_workflow(
  fl_nm_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  dir_path_1L_chr = ".github/workflows",
  options_chr = c("Y", "N")
)

Arguments

fl_nm_1L_chr

File name (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

dir_path_1L_chr

Directory path (a character vector of length one), Default: '.github/workflows'

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.


Description

write_to_force_links_in() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to force links in. The function is called for its side effects and does not return a value.

Usage

write_to_force_links_in(
  path_to_mkdn_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N"),
  shorten_doi_1L_lgl = TRUE
)

Arguments

path_to_mkdn_1L_chr

Path to markdown (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")

shorten_doi_1L_lgl

Shorten digital object identifier (a logical vector of length one), Default: TRUE

Value

No return value, called for side effects.


Write to publish dataverse dataset

Description

write_to_publish_dv_ds() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to publish dataverse dataset. The function is called for its side effects and does not return a value.

Usage

write_to_publish_dv_ds(
  dv_ds_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  minor_1L_lgl = FALSE,
  options_chr = c("Y", "N")
)

Arguments

dv_ds_1L_chr

Dataverse dataset (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

minor_1L_lgl

Minor (a logical vector of length one), Default: FALSE

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.


Write ready4 model documentation website page from an RMD or Rmarkdown file

Description

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.

Usage

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")
)

Arguments

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")

Value

No return value, called for side effects.

See Also

rmarkdown::render()

Examples


  # 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 to trim html

Description

write_to_trim_html() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write to trim html. The function is called for its side effects and does not return a value.

Usage

write_to_trim_html(
  path_to_html_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

path_to_html_1L_chr

Path to html (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")

Value

No return value, called for side effects.


Description

write_with_consent() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write with consent. The function returns Object (an output object of multiple potential types).

Usage

write_with_consent(
  consented_fn,
  prompt_1L_chr,
  consent_1L_chr = "",
  consented_args_ls = NULL,
  consent_indcs_int = 1L,
  consented_msg_1L_chr = character(0),
  declined_args_ls = NULL,
  declined_fn = NULL,
  declined_msg_1L_chr = "No files have been written.",
  force_from_opts_1L_chr = TRUE,
  options_chr = c("Y", "N"),
  return_1L_lgl = FALSE
)

Arguments

consented_fn

Consented (a function)

prompt_1L_chr

Prompt (a character vector of length one)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consented_args_ls

Consented arguments (a list), Default: NULL

consent_indcs_int

Consent indices (an integer vector), Default: 1

consented_msg_1L_chr

Consented message (a character vector of length one), Default: character(0)

declined_args_ls

Declined arguments (a list), Default: NULL

declined_fn

Declined (a function), Default: NULL

declined_msg_1L_chr

Declined message (a character vector of length one), Default: 'No files have been written.'

force_from_opts_1L_chr

Force from opts (a character vector of length one), Default: TRUE

options_chr

Options (a character vector), Default: c("Y", "N")

return_1L_lgl

Return (a logical vector of length one), Default: FALSE

Value

Object (an output object of multiple potential types)


Write words

Description

write_words() is a Write function that writes a file to a specified local directory. Specifically, this function implements an algorithm to write words. The function is called for its side effects and does not return a value.

Usage

write_words(
  new_words_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  gh_repo_1L_chr = "ready4-dev/ready4",
  gh_tag_1L_chr = "Documentation_0.0",
  options_chr = c("Y", "N")
)

Arguments

new_words_chr

New words (a character vector)

consent_1L_chr

Consent (a character vector of length one), Default: ”

consent_indcs_int

Consent indices (an integer vector), Default: 1

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'

options_chr

Options (a character vector), Default: c("Y", "N")

Value

No return value, called for side effects.


Write ready4 software development local directories

Description

write_ws() creates a standardised directory structure as a local development environment for modelling projects developed with the ready4 framework.

Usage

write_ws(
  path_1L_chr,
  consent_1L_chr = "",
  consent_indcs_int = 1L,
  options_chr = c("Y", "N")
)

Arguments

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")

Value

No return value, called for side effects.

Examples


  write_ws(tempdir())