diff --git a/pkgdown.yml b/pkgdown.yml index 2acfe56..f8fa420 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 3.1.11 pkgdown: 2.1.0 pkgdown_sha: ~ articles: {} -last_built: 2024-08-06T20:19Z +last_built: 2024-08-07T13:41Z urls: reference: https://dark-peak-analytics.github.io/assertHE/reference article: https://dark-peak-analytics.github.io/assertHE/articles diff --git a/reference/define_app_server.html b/reference/define_app_server.html index b98944b..6393582 100644 --- a/reference/define_app_server.html +++ b/reference/define_app_server.html @@ -37,7 +37,7 @@

Create Shiny app server logic

Usage

-
define_app_server(network_object, project_path)
+
define_app_server(network_object, project_path, foo_path)
@@ -51,6 +51,10 @@

Argumentsproject_path

Path to the project directory

+ +
foo_path
+

path to the function folder

+

Value

diff --git a/reference/get_function_data.html b/reference/get_function_data.html index ac7218d..3fbe929 100644 --- a/reference/get_function_data.html +++ b/reference/get_function_data.html @@ -37,7 +37,7 @@

Retrieve Function data to a list

Usage

-
get_function_data(foo_name)
+
get_function_data(foo_name, envir = environment())
@@ -47,6 +47,10 @@

Argumentsfoo_name

The name of the function to retrieve data from.

+ +
envir
+

The environment in which to look for the function.

+

Value

diff --git a/reference/run_shiny_app.html b/reference/run_shiny_app.html index 10e20a2..da3e30a 100644 --- a/reference/run_shiny_app.html +++ b/reference/run_shiny_app.html @@ -42,7 +42,8 @@

Usage serverFunction = define_app_server, network_object, network_title = "Function Network", - project_path + project_path, + foo_path )

@@ -69,6 +70,10 @@

Argumentsproject_path

Path to the project directory

+ +
foo_path
+

Path to the function folder

+

Value

diff --git a/reference/summarise_function_with_LLM.html b/reference/summarise_function_with_LLM.html index a6c54a7..a4d47f2 100644 --- a/reference/summarise_function_with_LLM.html +++ b/reference/summarise_function_with_LLM.html @@ -40,7 +40,8 @@

Usage
summarise_function_with_LLM(
   foo_name,
   llm_api_url = Sys.getenv("LLM_API_URL"),
-  llm_api_key = Sys.getenv("LLM_API_KEY")
+  llm_api_key = Sys.getenv("LLM_API_KEY"),
+  envir = environment()
 )

@@ -59,6 +60,10 @@

Argumentsllm_api_key

key for the API for the LLM

+ +
envir
+

The environment in which to look for the function.

+

Value

@@ -68,7 +73,8 @@

Value

Examples

if (FALSE) { # \dontrun{
-summarise_function_with_LLM("calculate_costs")
+summarise_function_with_LLM(foo_name = "get_active_functions",
+                            envir = rlang::ns_env("assertHE"))
 } # }
 
 
diff --git a/search.json b/search.json index 7a6e282..fc37ef8 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement rsmith@darkpeakanalytics.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"How to contribute","title":"How to contribute","text":"’m really glad ’re reading , need volunteer developers help project come fruition.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"how-to-get-involved","dir":"","previous_headings":"","what":"How to get involved","title":"How to contribute","text":"Please feel free either create issue proposed edit package, help build functionality already identified issue. Since want waste time, please begin develop new functionality discussed plans. may reason built functionality already.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"testing","dir":"","previous_headings":"","what":"Testing","title":"How to contribute","text":"submitting pull request, please ensure tests pass using testthat::test() run package checks devtools::check(). Please address warnings possible, notes, submitting pull request.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"submitting-changes","dir":"","previous_headings":"","what":"Submitting changes","title":"How to contribute","text":"Please send GitHub Pull Request main branch clear list ’ve done (read pull requests). send pull request, love forever include RSpec examples. can always use test coverage. Always write clear log message commits. One-line messages fine small changes, bigger changes look like :","code":"$ git commit -m \"A brief summary of the commit > > A paragraph describing what changed and its impact.\""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"more-information","dir":"","previous_headings":"","what":"More information","title":"How to contribute","text":"information using R health economic evaluation can found following open source academic papers: Smith R, Mohammed W Schneider P. Packaging cost-effectiveness models R: tutorial. version 1; peer review: awaiting peer review. Wellcome Open Res 2023, 8:419 https://doi.org/10.12688/wellcomeopenres.19656.1 Smith RA, Schneider PP Mohammed W. Living HTA: Automating Health Technology Assessment R. Wellcome Open Res 2022, 7:194 (https://doi.org/10.12688/wellcomeopenres.17933.2) Smith R Schneider P. Making health economic models Shiny: tutorial. Wellcome Open Res 2020, 5:69 (https://doi.org/10.12688/wellcomeopenres.15807.2) Please reach rsmith@darkpeakanalytics.com questions.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 assertHE authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Robert Smith. Author, maintainer.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Smith R (2024). assertHE: R package designed aid verification health economic decision models. R package version 0.0.0.9000, https://dark-peak-analytics.github.io/assertHE/.","code":"@Manual{, title = {assertHE: An R package designed to aid in verification of health economic decision models}, author = {Robert Smith}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://dark-peak-analytics.github.io/assertHE/}, }"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"asserthe","dir":"","previous_headings":"","what":"An R package designed to aid in verification of health economic decision models","title":"An R package designed to aid in verification of health economic decision models","text":"goal assertHE help modellers build review health economic models R. package provides functions can included within models check objects created conform standard rules (e.g. probabilities 0 1). also provides functions review structure model, showing network functions color coded test coverage. Users can click nodes see function test source code, test coverage create AI generated summary function. Rob outlined package R-HTA 2024 video slides publicly available interested finding . continuing work improve package welcome contributions. get involved, please see Contribution guide. context aims wider project please read wiki.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package designed to aid in verification of health economic decision models","text":"can install development version assertHE GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"dark-peak-analytics/assertHE\") library(assertHE)"},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"reviewing-model-structure","dir":"","previous_headings":"Using the package","what":"Reviewing model structure","title":"An R package designed to aid in verification of health economic decision models","text":"code creates visual representation model structure given project. user must provide path project folder, location functions (typically “R”) location tests (typically “tests/testthat”). result visual representation model functions. gives indication review model since function can checked isolation combination. may also reveal redundant code. example using function cdx2cea model. red nodes ones without tests, green nodes ones tests. hovering function can see information including defined (file line number) test () resides. coverage % function also provided. Tests coverage <20% red, 20-80% orange, 80% green. arbitrary cut-points, reviewers assess sufficiency testing. Function network cdx2cea","code":"visualise_project( project_path = \"path_to_project_directory\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = T)"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"using-the-llm-function-summary-tool","dir":"","previous_headings":"Using the package > Reviewing model structure","what":"Using the LLM function summary tool","title":"An R package designed to aid in verification of health economic decision models","text":"use LLM function summary tool follow guide .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"internal-checks-for-modellers","dir":"","previous_headings":"Using the package","what":"Internal checks for modellers","title":"An R package designed to aid in verification of health economic decision models","text":"package series functions used within models check objects created conform standard rules (e.g. probabilities 0 1). code shows basic example shows use check_trans_prob_array ensure time dependent transition probability array balanced.","code":"library(assertHE) # create a transition probability array n_t <- 1000 # number of cycles v_hs_names <- c(\"H\", \"S\", \"D\") # health states n_hs <- length(v_hs_names) # create array of transition probabilities a_P <- array( data = 0, dim = c(n_hs, n_hs, n_t), dimnames = list(v_hs_names, v_hs_names, 1:n_t) ) # fill in transition probabilities for main transitions. a_P[\"H\", \"S\",] <- 0.3 a_P[\"H\", \"D\",] <- 0.01 a_P[\"S\", \"D\",] <- 0.1 a_P[\"S\", \"H\",] <- 0.5 # Fill in the proportion remaining in health state in each slice. # This is the remainder after all other transitions are accounted for. for(x in 1:n_t){ diag(a_P[,,x]) <- 1 - rowSums(a_P[,,x]) } # Use the function from the package. # This check should return no error, the array is symmetric, numeric, values # are between 0 and 1 and all rows sum to 1. # Note: stop_if_not = F returns warnings, stop_if_not = T returns errors. check_trans_prob_array(a_P = a_P, stop_if_not = T) # We can introduce an error to see the output # In this case, we set the first 10 cycles of transition from H to S to 0. # This means that the rows don't sum to 1 for the H row for 1:10 cycle. a_P[\"H\", \"S\", 1:10] <- 0 check_trans_prob_array(a_P = a_P, stop_if_not = F) # The output looks like this: # Warning message: # In check_array_rows_balanced(a_P, stop_if_not = stop_if_not) : # Not valid transition probabilities # Transition probabilities not valid from Health States: # 1 H; at cycle 1 # 2 H; at cycle 2 # 3 H; at cycle 3 # 4 H; at cycle 4 # 5 H; at cycle 5 # 6 H; at cycle 6 # 7 H; at cycle 7 # 8 H; at cycle 8 # 9 H; at cycle 9 # 10 H; at cycle 10"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"using-the-package-to-review-models","dir":"","previous_headings":"","what":"Using the package to review models","title":"An R package designed to aid in verification of health economic decision models","text":"Please get contact like use package help review model R. following models visualized using package, test cases: NICE RCC Model sicksickerPack teaching model contained package. cdx2cea described Alarid-Escudero et al. 2022 DOACs-AF-Economic-model developed Bristol University CGD AMR Cost model - press. Embedding Economics Analysis Diabetes Microsimulation model described (press). Several internal models Dark Peak Analytics. Several internal models Maple Health. National Institute Health Care Excellence (NICE) built assertHE visualiser template model reviews. Health Economics Modelling Packages: - voi R package reviewed GSK team.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"sharing-interactive-model-networks","dir":"","previous_headings":"","what":"Sharing interactive model networks","title":"An R package designed to aid in verification of health economic decision models","text":"model generated, possible share HTML interactive network. visualisation tab click downward arrow ‘export’ button click ‘save web page’. visualisation HTML file may take load large networks. However, funtionality HTML version (shiny version links) .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"get-in-contact","dir":"","previous_headings":"","what":"Get in contact","title":"An R package designed to aid in verification of health economic decision models","text":"get contact project collaborations please feel free message . Dr. Robert Smith Contact: rsmith@darkpeakanalytics.com Website: Dark Peak Analytics","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and initialize a vector — check_init","title":"Check and initialize a vector — check_init","text":"function checks given vector several conditions, including values within range 0 1 inclusive, sum values equal 1, duplicate names, elements names.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and initialize a vector — check_init","text":"","code":"check_init(x)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and initialize a vector — check_init","text":"x numeric vector named elements.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and initialize a vector — check_init","text":"successful message, otherwise, issues warnings informative messages failed condition.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check and initialize a vector — check_init","text":"","code":"if (FALSE) { # \\dontrun{ x <- setNames(object = c(0.2, 0.3, 0.4, 0.1), nm = letters[1:4]) check_init(x) # Should issue warnings for values outside 0-1 and the sum not equal to 1 x <- c(0.2, 0.3, 0.4, 0.1) # Missing names check_init(x) # Should issue a warning about missing names x <- c(-2, 0.3, 0.4, 0.1) # Missing names check_init(x) # Should issue a warning about a value below 0 and about not summing to 1 } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Markov Trace — check_markov_trace","title":"Check Markov Trace — check_markov_trace","text":"function checks properties markov trace conform expectations. : numeric, values 0 1 rows summing 1. Also allows users check dead state monotonically decreasing (provided)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Markov Trace — check_markov_trace","text":"","code":"check_markov_trace(m_TR, dead_state = NULL, confirm_ok = F, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Markov Trace — check_markov_trace","text":"m_TR markov trace checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") confirm_ok OK, return message confirming checks passed. stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Markov Trace — check_markov_trace","text":"message indicating whether matrix passed checks error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Markov Trace — check_markov_trace","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) n_t <- 10 m_TR <- matrix(data = NA, nrow = n_t, ncol = n_hs, dimnames = list(NULL, v_hs_names)) m_TR[, \"H\"] <- seq(1, 0, length.out = n_t) m_TR[, \"S\"] <- seq(0, 0.5, length.out = n_t) m_TR[, \"D\"] <- 1 - m_TR[, \"H\"] - m_TR[, \"S\"] check_markov_trace(m_TR = m_TR, dead_state = \"D\", confirm_ok = T) m_TR[10, \"D\"] <- 0 m_TR[9, \"S\"] <- 1 check_markov_trace(m_TR = m_TR, stop_if_not = T, dead_state = \"D\", confirm_ok = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Transition Probability Array — check_trans_prob_array","title":"Check Transition Probability Array — check_trans_prob_array","text":"function checks properties transition probability array 2 three dimensions conform standard expectations. slice : symmetric, numeric, values 0 1 rows summing 1. dead state provided, checks dead state -> dead state probability slice equal 1.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Transition Probability Array — check_trans_prob_array","text":"","code":"check_trans_prob_array(a_P, dead_state = NULL, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Transition Probability Array — check_trans_prob_array","text":"a_P transition probability array checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Transition Probability Array — check_trans_prob_array","text":"message indicating whether array passed checks warning/error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Transition Probability Array — check_trans_prob_array","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) a_P <- array( data = 0, dim = c(n_hs, n_hs, 1000), dimnames = list(v_hs_names, v_hs_names, 1:1000) ) a_P[\"H\", \"S\",] <- 0.3 a_P[\"H\", \"D\",] <- 0.01 a_P[\"S\", \"D\",] <- 0.1 a_P[\"S\", \"H\",] <- 0.5 for(x in 1:1000){ diag(a_P[,,x]) <- 1 - rowSums(a_P[,,x]) } check_trans_prob_array(a_P = a_P, stop_if_not = F) # introduce error a_P[\"H\", \"S\", 1:10] <- 0 check_trans_prob_array(a_P = a_P, stop_if_not = F) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Transition Probability Matrix — check_trans_prob_mat","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"function checks properties transition probability matrix conform standard expectations. : symmetric, numeric, values 0 1 rows summing 1. dead state provided, checks dead state -> dead state probability 1.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"","code":"check_trans_prob_mat(m_P, dead_state = NULL, confirm_ok = F, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"m_P transition probability matrix checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") confirm_ok OK, return message confirming checks passed. stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"message indicating whether matrix passed checks warning/error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) m_P <- matrix(data = 0, nrow = n_hs, ncol = n_hs, dimnames = list(v_hs_names, v_hs_names)) m_P[\"H\", \"S\"] <- 0.3 m_P[\"H\", \"D\"] <- 0.01 m_P[\"S\", \"D\"] <- 0.1 m_P[\"S\", \"H\"] <- 0.5 diag(m_P) <- (1 - rowSums(m_P)) check_trans_prob_mat(m_P) # introduce error m_P[\"H\", \"S\"] <- 0.2 check_trans_prob_mat(m_P, confirm_ok = T, stop_if_not = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a prompt for a LLM — create_prompt","title":"Create a prompt for a LLM — create_prompt","text":"Uses function arguments function body inputs create prompt LLM.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a prompt for a LLM — create_prompt","text":"","code":"create_prompt(foo_arguments, foo_body, foo_name, foo_desc, foo_title)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a prompt for a LLM — create_prompt","text":"foo_arguments arguments function foo_body body function foo_name function name foo_desc function description foo_title function title","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a prompt for a LLM — create_prompt","text":"single prompt form character string","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a prompt for a LLM — create_prompt","text":"","code":"if (FALSE) { # \\dontrun{ create_prompt( foo_arguments = LETTERS[1:3], foo_body = \"D <- A+B+C; return(D)\", foo_name = \"calculate_QALYs\", foo_desc = \"This function calcs QALYs\", foo_title = \"Calculate the QALYs\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Shiny app server logic — define_app_server","title":"Create Shiny app server logic — define_app_server","text":"Create Shiny app server logic","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Shiny app server logic — define_app_server","text":"","code":"define_app_server(network_object, project_path)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Shiny app server logic — define_app_server","text":"network_object visNetwork object displayed shiny app project_path Path project directory","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Shiny app server logic — define_app_server","text":"Shiny app server logic","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Shiny app UI — define_app_ui","title":"Create Shiny app UI — define_app_ui","text":"Create Shiny app UI","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Shiny app UI — define_app_ui","text":"","code":"define_app_ui(network_title)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Shiny app UI — define_app_ui","text":"network_title Character string representing title network displayed network.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Shiny app UI — define_app_ui","text":"Shiny app user interface","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":null,"dir":"Reference","previous_headings":"","what":"Called By — .called_by","title":"Called By — .called_by","text":"Identify functions called given function within specified project folder","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Called By — .called_by","text":"","code":".called_by(fname, all_functions, pkg_env)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Called By — .called_by","text":"fname name target function. all_functions character vector function names project. pkg_env package environment functions defined (e.g. global).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Called By — .called_by","text":"data.table two columns (\"\" \"\") representing dependencies target function. Returns NA dependencies found.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Called By — .called_by","text":"function identifies functions called target function fname within specified package environment pkg_env. searches dependencies within literal code function body returns data.table two columns (\"\" \"\") representing dependencies. dependencies found, returns data.table \"\" target function \"\" NA. Note: function may potentially miss calls attributes closure. example function defined within another function, capturing environment outer function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Called By — .called_by","text":"","code":"if (FALSE) { # \\dontrun{ # Identify functions called by a specific function .called_by( fname = \"my_function\", all_functions = c(\"function1\", \"function2\", \"function3\"), pkg_env = environment()) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Function — .parse_function","title":"Parse Function — .parse_function","text":"function parses R expression, breaking components.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Function — .parse_function","text":"","code":".parse_function(x)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Function — .parse_function","text":"x R expression parsed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Function — .parse_function","text":"character string list parsed components, depending input expression.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parse Function — .parse_function","text":"input expression x atomic value, symbol, environment pointer, function breaks list components. also handles expressions form foo$bar splitting , keeping relevant parts parsing. x list expressions, function recursively parses expression can longer listed, filtering atomic values process. x listable (e.g. function), deparsed character string.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse Function — .parse_function","text":"","code":"if (FALSE) { # \\dontrun{ # Parse a simple expression tmp <- dplyr::across .parse_function(tmp) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract function name from a string — extract_function_name","title":"Extract function name from a string — extract_function_name","text":"Extract function name long string. works identifying \"function(\" string finding operand splitting keeping character .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract function name from a string — extract_function_name","text":"","code":"extract_function_name(string)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract function name from a string — extract_function_name","text":"string string containing function definition, must contain word 'function'","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract function name from a string — extract_function_name","text":"string containing function name","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":null,"dir":"Reference","previous_headings":"","what":"find_files — find_files","title":"find_files — find_files","text":"Find files based upon regular expression searching IMPORTANT - Directory file. (instances file systems)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"find_files — find_files","text":"","code":"find_files( file_regx = \".R\", path = \".\", recursive = TRUE, exclude_files = NULL, exclude_dirs = NULL )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"find_files — find_files","text":"file_regx = \".*\" - regular expression files source path = \".\" - path search recursive = TRUE - recurse subdirectories exclude_files = NULL - regx files exclude exclude_dirs = NULL - regx directories exclude","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"find_files — find_files","text":"list files","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"Applies find_function_definitions file folder aggregate results","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"","code":"find_folder_function_definitions( foo_folder = \".\", f_excl = NULL, d_excl = NULL )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"foo_folder folder apply find_function_definitions script . f_excl regular expression files process (basename) d_excl regular expression directories process (dirname)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"dataframe containing column function string column function location.","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Find all function calls in file — find_function_calls_in_file","title":"Find all function calls in file — find_function_calls_in_file","text":"Searches file function calls using SYMBOL_FUNCTION_CALL","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find all function calls in file — find_function_calls_in_file","text":"","code":"find_function_calls_in_file( relative_path = NULL, foo_strings, filter_for_test_that = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find all function calls in file — find_function_calls_in_file","text":"relative_path path file search foo_strings string vector function names search filter_for_test_that whether filter functions used call test_that. Default FALSE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find all function calls in file — find_function_calls_in_file","text":"dataframe columns 'foo' function name 'location' gives file function called line function called appended.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find all function calls in file — find_function_calls_in_file","text":"","code":"if (FALSE) { # \\dontrun{ find_function_calls_in_file( relative_path = \"tests/testthat/example_project/tests/testthat/test-calculate_costs.R\", foo_strings = \"calculate_costs\" ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":null,"dir":"Reference","previous_headings":"","what":"Find specific function calls in a folder — find_function_calls_in_folder","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"Runs find_function_calls_in_file files folder, combined results single dataframe","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"","code":"find_function_calls_in_folder( test_folder, foo_strings, filter_for_test_that = F )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"test_folder folder containing tests foo_strings string vector function names search filter_for_test_that whether filter functions used call test_that. Default FALSE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"dataframe two columns. 'foo' contains function names, location contains location tests function (file line number).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"","code":"if (FALSE) { # \\dontrun{ find_function_calls_in_folder(foo_strings = c(\"calculate_costs\", \"calculate_QALYs\", \"create_Markov_trace\", \"FOO_WITH_NO_TESTS\"), test_folder = \"./tests/testthat/example_project/tests/testthat\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":null,"dir":"Reference","previous_headings":"","what":"Parses an R source file, returns function names defined within. — find_function_definitions","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"Using utils::getParseData(), searches function definitions matching FUNCTION keyword (.e. \"function\") associated SYMBOL (.e function name)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"","code":"find_function_definitions(filename)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"filename string containing path R source file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"dataframe interesting information","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"","code":"if (FALSE) { # \\dontrun{ find_function_definitions(filename = \"tests/testthat/example_scripts/example_tricky_functions.R\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the next element of the vector after a value — find_next_vector_element","title":"Find the next element of the vector after a value — find_next_vector_element","text":"Find next element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the next element of the vector after a value — find_next_vector_element","text":"","code":"find_next_vector_element(value, vector, LTE = FALSE)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the next element of the vector after a value — find_next_vector_element","text":"value value numeric values vector vector numeric values LTE boolean determine collection \"greater equal\"","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the next element of the vector after a value — find_next_vector_element","text":"next element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the next element of the vector after a value — find_next_vector_element","text":"","code":"if (FALSE) { # \\dontrun{ find_next_vector_element(value = 5, vector = 1:10) find_next_vector_element(value = 5, vector = 1:4) find_next_vector_element(value = 5, vector = 1:5, LTE = F) find_next_vector_element(value = 5, vector = 1:5, LTE = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the previous element of the vector before a value — find_previous_vector_element","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"Find previous element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"","code":"find_previous_vector_element(value, vector, LTE = FALSE)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"value value numeric values vector vector numeric values LTE boolean determine collection \"less \" \"less equal\"","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"previous element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"","code":"if (FALSE) { # \\dontrun{ find_previous_vector_element(value = 5, vector = 1:10) find_previous_vector_element(value = 5, vector = 6:10) find_previous_vector_element(value = 5, vector = 5:10, LTE = F) find_previous_vector_element(value = 5, vector = 5:10, LTE = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":null,"dir":"Reference","previous_headings":"","what":"get all active functions that exist in the global environment — get_active_functions","title":"get all active functions that exist in the global environment — get_active_functions","text":"get active functions exist global environment","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get all active functions that exist in the global environment — get_active_functions","text":"","code":"get_active_functions(packages = \"assertHE\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get all active functions that exist in the global environment — get_active_functions","text":"packages vector containing names packages include search","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get all active functions that exist in the global environment — get_active_functions","text":"vector containing names active functions global environment","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":null,"dir":"Reference","previous_headings":"","what":"Get cheers classification tags from a given file — get_file_cheers_classifications","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"provided filepath, identify cheers classification tags function names follow .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"","code":"get_file_cheers_classifications( filename, cheers_pattern, function_pattern = \"(\\\\s|=|-)function\\\\(\" )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"filename string containing filepath file checked cheers_pattern string containing roxygen tag cheers used identifier function_pattern string containing pattern identify functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"list containing cheers tags function names follow ","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":null,"dir":"Reference","previous_headings":"","what":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"provided folder path, identify cheers classification tags function names follow .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"","code":"get_folder_cheers_classifications(path, cheers_pattern, path_ignore = \"tests/\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"path string containing filepath folder checked cheers_pattern string containing roxygen tag cheers used identifier path_ignore string containing pattern identify files ignore","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"list containing cheers tags function names follow ","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":null,"dir":"Reference","previous_headings":"","what":"Get coverage by function — get_foo_coverage","title":"Get coverage by function — get_foo_coverage","text":"Get coverage function","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get coverage by function — get_foo_coverage","text":"","code":"get_foo_coverage(foo_folder, test_folder)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get coverage by function — get_foo_coverage","text":"foo_folder folder containing functions test_folder folder containing tests","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get coverage by function — get_foo_coverage","text":"dataframe column functions column coverage","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get coverage by function — get_foo_coverage","text":"","code":"if (FALSE) { # \\dontrun{ get_foo_coverage( foo_folder = \"tests/testthat/example_project/R\", test_folder = \"tests/testthat/example_project/tests/testthat\" ) get_foo_coverage( foo_folder = \"R\", test_folder = \"tests/testthat\" ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Function data to a list — get_function_data","title":"Retrieve Function data to a list — get_function_data","text":"function retrieves data arguments body specified function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Function data to a list — get_function_data","text":"","code":"get_function_data(foo_name)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Function data to a list — get_function_data","text":"foo_name name function retrieve data .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Function data to a list — get_function_data","text":"list elements 'arguments' 'body' specified function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve Function data to a list — get_function_data","text":"","code":"if (FALSE) { # \\dontrun{ get_function_data(foo_name = \"create_Markov_trace\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract function line in file path — get_function_line","title":"Extract function line in file path — get_function_line","text":"Extract function line file path","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract function line in file path — get_function_line","text":"","code":"get_function_line(file_location)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract function line in file path — get_function_line","text":"file_location Character scalar specifying path file.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract function line in file path — get_function_line","text":"numeric scalar","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract function line in file path — get_function_line","text":"","code":"if (FALSE) { # \\dontrun{ cleaned_function_line <- get_function_line( file_location = \"tests/testthat/example_project/R/calculate_QALYs.R:L41\" ) cleaned_function_line <- get_function_line( file_location = c( \"tests/testthat/example_project/R/calculate_QALYs.R#L41\", \"tests/testthat/example_project/R/calculate_QALYs.R#L49\" ) ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove artefacts from file path — get_function_path","title":"Remove artefacts from file path — get_function_path","text":"Remove artefacts file path","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove artefacts from file path — get_function_path","text":"","code":"get_function_path(file_location, project_path)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove artefacts from file path — get_function_path","text":"file_location Character scalar specifying path file. project_path Character scalar specifying path project.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove artefacts from file path — get_function_path","text":"character scalar","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove artefacts from file path — get_function_path","text":"","code":"if (FALSE) { # \\dontrun{ cleaned_file_path <- get_function_path( file_location = \"tests/testthat/example_project/R/calculate_QALYs.R#L41\" ) cleaned_file_path <- get_function_path( file_location = c( \"tests/testthat/example_project/R/calculate_QALYs.R#L41\", \"tests/testthat/example_project/R/calculate_QALYs.R#L49\" ) ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Isolated Functions — get_isolated_foo","title":"Get Isolated Functions — get_isolated_foo","text":"Get Isolated Functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Isolated Functions — get_isolated_foo","text":"","code":"get_isolated_foo(df_edges)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Isolated Functions — get_isolated_foo","text":"df_edges data.table two columns (\"\" \"\") representing dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Isolated Functions — get_isolated_foo","text":"vector isolated function names.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Isolated Functions — get_isolated_foo","text":"","code":"if (FALSE) { # \\dontrun{ get_isolated_foo(df_edges = data.frame(from = c(\"a\", \"b\", \"c\", \"d\"), to = c(\"b\", \"c\", NA, NA))) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Title and Description from Parsed List — get_roxygen_description","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"function extracts title description parsed list.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"","code":"get_roxygen_description(parsed_list)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"parsed_list list containing parsed elements.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"list containing title description.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"","code":"if (FALSE) { # \\dontrun{ parsed_list <- list(list(tag = \"title\", val = \"Sample Title\"), list(tag = \"description\", val = \"This is a sample description.\")) get_roxygen_description(parsed_list) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":null,"dir":"Reference","previous_headings":"","what":"Get roxygen title and description from function — get_roxygen_description_from_foo","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"Get roxygen title description function","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"","code":"get_roxygen_description_from_foo(foo_name)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"foo_name function want descriotion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"text containing description","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"","code":"if (FALSE) { # \\dontrun{ source_files(path = \"tests/testthat/example_project/R\", keep_source = TRUE) get_roxygen_description_from_foo(\"calculate_costs\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Dependencies — identify_dependencies","title":"Identify Dependencies — identify_dependencies","text":"Identify dependencies functions.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Dependencies — identify_dependencies","text":"","code":"identify_dependencies(v_unique_foo, pkg_env = environment())"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Dependencies — identify_dependencies","text":"v_unique_foo Vector unique function strings. pkg_env package environment functions defined (e.g. global).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify Dependencies — identify_dependencies","text":"data.table two columns (\"\" \"\") representing dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":null,"dir":"Reference","previous_headings":"","what":"locate_funcs — locate_funcs","title":"locate_funcs — locate_funcs","text":"locates lines define function within single file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"locate_funcs — locate_funcs","text":"","code":"locate_funcs(file)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"locate_funcs — locate_funcs","text":"file = connection object character string path file.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"locate_funcs — locate_funcs","text":"Returns data frame following columns: func_num: ID function - monotonic increasing 1. func_start: line number (within file) function start. func_end: line number function end.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"locate_funcs — locate_funcs","text":"","code":"if (FALSE) { # \\dontrun{ locate_funcs(file) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":null,"dir":"Reference","previous_headings":"","what":"Create closable shiny tab — make_closable_tab","title":"Create closable shiny tab — make_closable_tab","text":"Create closable shiny tab","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create closable shiny tab — make_closable_tab","text":"","code":"make_closable_tab(tab_name, content_output_Id, output_type = \"text\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create closable shiny tab — make_closable_tab","text":"tab_name Character scalar representing name title shiny tab. content_output_Id Character scalar representing id shiny tab. output_type Character scalar specifying type rendered output. Default \"text\" can also accept \"HTML\".","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create closable shiny tab — make_closable_tab","text":"tab can passed shiny::tabsetPanel()","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Network — plotNetwork","title":"Plot Network — plotNetwork","text":"Visualize network plot using visNetwork package.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Network — plotNetwork","text":"","code":"plotNetwork( df_edges, from_col = \"from\", to_col = \"to\", df_summary, df_coverage, color_no_test = c(background = \"#fad1d0\", border = \"#9c0000\", highlight = \"#9c0000\"), color_with_test = c(background = \"#e6ffe6\", border = \"#65a765\", highlight = \"#65a765\"), color_mod_coverage = c(background = \"#FFD580\", border = \"#E49B0F\", highlight = \"#E49B0F\"), moderate_coverage_range = c(0.2, 0.8), show_in_shiny = FALSE, network_title = NULL, scale_node_size_by_degree = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Network — plotNetwork","text":"df_edges data frame containing columns \"\" \"\" representing edges network. from_col Name column df_edges representing source nodes. to_col Name column df_edges representing target nodes. df_summary summary dataframe containing information function. df_coverage summary dataframe function names test coverages color_no_test named vector hexcodes background, border highlight color_with_test named vector hexcodes background, border highlight color_mod_coverage named vector hexcodes background, border highlight coverage moderate moderate_coverage_range vector two values giving range defined moderate coverage. show_in_shiny logical scalar indicating whether prepare/deploy network using built shiny app. Default FALSE. network_title title network plot. scale_node_size_by_degree Scale node size degree centrality node.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Network — plotNetwork","text":"visNetwork object representing network plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Network — plotNetwork","text":"","code":"if (FALSE) { # \\dontrun{ # Plot a network from a data frame of edges plotNetwork(df_edges) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"function plots cumulative mean incremental net monetary benefit (INMB), incremental cost-effectiveness ratio (ICER), incremental costs, incremental effects different strategies compared specified comparator.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"","code":"plot_PSA_stability( m_eff, m_cost, lambda, currency_symbol = \"$\", v_strategy_labels = NULL, v_strategy_colors = NULL, comparator = NULL, output = \"inmb\", include_reference_line = T, log_x = F )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"m_eff Numeric matrix effects different strategies. m_cost Numeric matrix costs different strategies. lambda Numeric value specifying willingness--pay threshold ICER. currency_symbol String specifying currency symbol y-axis labels. v_strategy_labels Named vector strategy labels e.g. c(\"\" = \"Strategy \"). v_strategy_colors Named vector strategy colors e.g. c(\"\" = \"#665BA6\"). comparator Column name representing comparator strategy (e.g. \"\"). output String specifying type plot, limited : \"inmb\", \"icer\", \"costs\", \"effects\". include_reference_line Logical indicating whether include reference line. log_x Logical indicating whether use logarithmic scale x-axis.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"ggplot object representing cumulative mean PSA stability plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"","code":"if (FALSE) { # \\dontrun{ # create example matrices m_eff <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$e)[,1:5] colnames(m_eff) <- LETTERS[1:length(colnames(m_eff))] m_cost <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$c)[,1:5] colnames(m_cost) <- LETTERS[1:length(colnames(m_cost))] v_strategy_labels <- setNames(object = paste0(\"Strategy \", colnames(m_eff)), nm = colnames(m_eff)) v_strategy_colors <- setNames(object = grDevices::palette.colors(n = ncol(m_eff)), nm = colnames(m_eff)) plot_PSA_stability(m_eff = m_eff[, 1:5], m_cost = m_cost[, 1:5], lambda = 20000, currency_symbol = \"\\u0024\", v_strategy_labels = v_strategy_labels, v_strategy_colors = v_strategy_colors, comparator = colnames(m_eff)[1], output = \"icer\", include_reference_line = T, log_x = F) } # } # end don't run."},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Nodes — processNodes","title":"Process Nodes — processNodes","text":"Process unique nodes dataframe edges.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Nodes — processNodes","text":"","code":"processNodes(df_edges, from_col = \"from\", to_col = \"to\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Nodes — processNodes","text":"df_edges data frame containing columns \"\" \"\" representing edges network. from_col Name column df_edges representing source nodes. to_col Name column df_edges representing target nodes.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Nodes — processNodes","text":"data frame unique nodes labels.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the content from the output of the LLM — return_message","title":"Extract the content from the output of the LLM — return_message","text":"Extracts content prints number tokens used message.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the content from the output of the LLM — return_message","text":"","code":"return_message(API_response, verbose = T)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the content from the output of the LLM — return_message","text":"API_response response LLM API verbose whether include message number token's used","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the content from the output of the LLM — return_message","text":"single string summary content LLM response","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a Shiny app to host a network visualization — run_shiny_app","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"Run Shiny app host network visualization","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"","code":"run_shiny_app( uiFunction = define_app_ui, serverFunction = define_app_server, network_object, network_title = \"Function Network\", project_path )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"uiFunction Function defining shiny user-interface serverFunction Function defining shiny server logic network_object visNetwork object displayed shiny app network_title Title displayed hte app title project_path Path project directory","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"shiny app","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"","code":"if (FALSE) { # \\dontrun{ network_object <- visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE ) run_shiny_app(network_object = network_object) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":null,"dir":"Reference","previous_headings":"","what":"source_files — source_files","title":"source_files — source_files","text":"Source files based upon regular expression searching","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_files — source_files","text":"","code":"source_files( file_regx = \".R\", path = \".\", recursive = TRUE, exclude_files = NULL, exclude_dirs = NULL, funcs_only = FALSE, verbose = FALSE, keep_source = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_files — source_files","text":"file_regx = \".*\" - regular expression files source path = \".\" - path search recursive = TRUE - recurse subdirectories exclude_files = NULL - regx files exclude exclude_dirs = NULL - regx directories exclude funcs_only = FALSE - source identified functions, whole file verbose = FALSE - whether emit sourced files. keep_source = FALSE - whether keep source data using source.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"source_files — source_files","text":"list files sourced","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_files — source_files","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":null,"dir":"Reference","previous_headings":"","what":"source_funcs — source_funcs","title":"source_funcs — source_funcs","text":"Sources functions discovered R file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_funcs — source_funcs","text":"","code":"source_funcs(file, env = .GlobalEnv)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_funcs — source_funcs","text":"file = connection object character string path file. env environment source functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_funcs — source_funcs","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"source_funcs — source_funcs","text":"","code":"if (FALSE) { # \\dontrun{ file <- \"/file.R\" source_funcs(file) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":null,"dir":"Reference","previous_headings":"","what":"source_lines — source_lines","title":"source_lines — source_lines","text":"Sources specified lines within single file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_lines — source_lines","text":"","code":"source_lines(file, lines, env = .GlobalEnv)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_lines — source_lines","text":"file = connection object character string path file. lines = vector integers specifying lines sourced. env environment source lines","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_lines — source_lines","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"source_lines — source_lines","text":"","code":"if (FALSE) { # \\dontrun{ source_lines(file = \"PATH/filename\", ## any file name, or a Connection object lines = c(4, 5, 6) ) ## source lines 4-6 } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"Summarise function using LLM via API retrieve result","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"","code":"summarise_function_from_arguments_and_body( foo_name, foo_arguments, foo_body, foo_title, foo_desc, model_name = \"gpt-3.5-turbo-0125\", llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\") )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"foo_name function name foo_arguments vector arguments foo_body single character containing unparsed body foo_title function title foo_desc function description model_name name LLM use (default gpt-3.5-turbo-0125) llm_api_url url API LLM llm_api_key key API LLM","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"response LLM containing pertinant information & tokens used","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"","code":"if (FALSE) { # \\dontrun{ tmp <- summarise_function_from_arguments_and_body( foo_arguments = LETTERS[1:3], foo_body = \"D <- A+B+C; return(D)\", model_name = \"gpt-3.5-turbo-0125\", llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\"), foo_desc = \"add three numbers, these numbers relate to the number of apples on three trees\", foo_title = \"apple adder\", foo_name = \"apple_add\" ) httr::content(tmp) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a function using a Large Language Model — summarise_function_with_LLM","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"function summarizes another function using Language Model.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"","code":"summarise_function_with_LLM( foo_name, llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\") )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"foo_name function name llm_api_url url API LLM llm_api_key key API LLM","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"character string summary function based arguments body.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"","code":"if (FALSE) { # \\dontrun{ summarise_function_with_LLM(\"calculate_costs\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise the model functions in a single folder. — summarise_model","title":"Summarise the model functions in a single folder. — summarise_model","text":"Summarise model functions single folder.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise the model functions in a single folder. — summarise_model","text":"","code":"summarise_model( project_path = \".\", foo_folder = \"R\", exclude_files = NULL, exclude_dirs = NULL, test_folder = NULL, output_format = \"dataframe\" )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise the model functions in a single folder. — summarise_model","text":"project_path path project folder, provided, use current working directory. foo_folder path folder containing functions model exclude_files regular expression files process (basename) exclude_dirs regular expression directories process (dirname) test_folder folder containing tests output_format output format use, defaults dataframe, options include latex word.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise the model functions in a single folder. — summarise_model","text":"dataframe three columns. 'foo_string' contains function names, 'foo_location' contains location function definitions, 'test_location' contains locations tests function (file line number).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise the model functions in a single folder. — summarise_model","text":"","code":"if (FALSE) { # \\dontrun{ project_path <- \"tests/testthat/example_project\" foo_folder <- \"R\" test_folder <- \"tests/testthat\" summarise_model(project_path = \"./tests/testthat/example_project\", foo_folder = foo_folder, test_folder = test_folder) summarise_model(foo_folder = foo_folder, test_folder = NULL) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize Project — visualise_project","title":"Visualize Project — visualise_project","text":"Visualize dependencies functions project using network plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize Project — visualise_project","text":"","code":"visualise_project( project_path, foo_path = \"R\", test_path = NULL, exclude_files = NULL, exclude_dirs = NULL, run_coverage = F, color_no_test = c(background = \"#fad1d0\", border = \"#9c0000\", highlight = \"#9c0000\"), color_with_test = c(background = \"#e6ffe6\", border = \"#65a765\", highlight = \"#65a765\"), color_mod_coverage = c(background = \"#FFD580\", border = \"#E49B0F\", highlight = \"#E49B0F\"), moderate_coverage_range = c(0.2, 0.8), print_isolated_foo = FALSE, show_in_shiny = FALSE, network_title = \"Function Network\", scale_node_size_by_degree = TRUE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize Project — visualise_project","text":"project_path Path project folder. foo_path Path folder containing foo functions. test_path Path folder containing test functions. exclude_files regular expression files process (basename) exclude_dirs regular expression directories process (dirname) run_coverage Boolean determining whether run coverage assessment color_no_test named vector hexcodes background, border highlight color_with_test named vector hexcodes background, border highlight color_mod_coverage named vector hexcodes background, border highlight coverage moderate moderate_coverage_range vector two values giving range defined moderate coverage. print_isolated_foo Print isolated functions console (default false) show_in_shiny logical scalar indicating whether prepare/deploy network using built shiny app. Default FALSE. network_title title network plot. scale_node_size_by_degree Scale node size degree centrality node.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize Project — visualise_project","text":"visNetwork object representing network plot function dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualize Project — visualise_project","text":"","code":"if (FALSE) { # \\dontrun{ # Visualize project dependencies in HTML visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE ) # Visualize project dependencies in shiny visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE, show_in_shiny = TRUE ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a string to lines of a specified width — wrap_string","title":"Wrap a string to lines of a specified width — wrap_string","text":"function takes input string wraps lines specified width, breaking string word boundaries.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a string to lines of a specified width — wrap_string","text":"","code":"wrap_string(input_string, width = 80)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a string to lines of a specified width — wrap_string","text":"input_string input string wrapped. width maximum width line. Default 80 characters.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a string to lines of a specified width — wrap_string","text":"character vector element represents line wrapped string.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrap a string to lines of a specified width — wrap_string","text":"","code":"input_string <- \"This is a long string that needs to be wrapped to fit within a specified width.\" wrapped_lines <- wrap_string(input_string, width = 30) cat(wrapped_lines, sep = \"\\n\") #> #> This is a long string that #> needs to be wrapped to fit #> within #> a #> specified width."}] +[{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement rsmith@darkpeakanalytics.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"How to contribute","title":"How to contribute","text":"’m really glad ’re reading , need volunteer developers help project come fruition.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"how-to-get-involved","dir":"","previous_headings":"","what":"How to get involved","title":"How to contribute","text":"Please feel free either create issue proposed edit package, help build functionality already identified issue. Since want waste time, please begin develop new functionality discussed plans. may reason built functionality already.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"testing","dir":"","previous_headings":"","what":"Testing","title":"How to contribute","text":"submitting pull request, please ensure tests pass using testthat::test() run package checks devtools::check(). Please address warnings possible, notes, submitting pull request.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"submitting-changes","dir":"","previous_headings":"","what":"Submitting changes","title":"How to contribute","text":"Please send GitHub Pull Request main branch clear list ’ve done (read pull requests). send pull request, love forever include RSpec examples. can always use test coverage. Always write clear log message commits. One-line messages fine small changes, bigger changes look like :","code":"$ git commit -m \"A brief summary of the commit > > A paragraph describing what changed and its impact.\""},{"path":"https://dark-peak-analytics.github.io/assertHE/CONTRIBUTING.html","id":"more-information","dir":"","previous_headings":"","what":"More information","title":"How to contribute","text":"information using R health economic evaluation can found following open source academic papers: Smith R, Mohammed W Schneider P. Packaging cost-effectiveness models R: tutorial. version 1; peer review: awaiting peer review. Wellcome Open Res 2023, 8:419 https://doi.org/10.12688/wellcomeopenres.19656.1 Smith RA, Schneider PP Mohammed W. Living HTA: Automating Health Technology Assessment R. Wellcome Open Res 2022, 7:194 (https://doi.org/10.12688/wellcomeopenres.17933.2) Smith R Schneider P. Making health economic models Shiny: tutorial. Wellcome Open Res 2020, 5:69 (https://doi.org/10.12688/wellcomeopenres.15807.2) Please reach rsmith@darkpeakanalytics.com questions.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 assertHE authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Robert Smith. Author, maintainer.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Smith R (2024). assertHE: R package designed aid verification health economic decision models. R package version 0.0.0.9000, https://dark-peak-analytics.github.io/assertHE/.","code":"@Manual{, title = {assertHE: An R package designed to aid in verification of health economic decision models}, author = {Robert Smith}, year = {2024}, note = {R package version 0.0.0.9000}, url = {https://dark-peak-analytics.github.io/assertHE/}, }"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"asserthe","dir":"","previous_headings":"","what":"An R package designed to aid in verification of health economic decision models","title":"An R package designed to aid in verification of health economic decision models","text":"goal assertHE help modellers build review health economic models R. package provides functions can included within models check objects created conform standard rules (e.g. probabilities 0 1). also provides functions review structure model, showing network functions color coded test coverage. Users can click nodes see function test source code, test coverage create AI generated summary function. Rob outlined package R-HTA 2024 video slides publicly available interested finding . continuing work improve package welcome contributions. get involved, please see Contribution guide. context aims wider project please read wiki.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"An R package designed to aid in verification of health economic decision models","text":"can install development version assertHE GitHub :","code":"# install.packages(\"devtools\") devtools::install_github(\"dark-peak-analytics/assertHE\") library(assertHE)"},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"reviewing-model-structure","dir":"","previous_headings":"Using the package","what":"Reviewing model structure","title":"An R package designed to aid in verification of health economic decision models","text":"code creates visual representation model structure given project. user must provide path project folder, location functions (typically “R”) location tests (typically “tests/testthat”). result visual representation model functions. gives indication review model since function can checked isolation combination. may also reveal redundant code. example using function cdx2cea model. red nodes ones without tests, green nodes ones tests. hovering function can see information including defined (file line number) test () resides. coverage % function also provided. Tests coverage <20% red, 20-80% orange, 80% green. arbitrary cut-points, reviewers assess sufficiency testing. Function network cdx2cea","code":"visualise_project( project_path = \"path_to_project_directory\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = T)"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"using-the-llm-function-summary-tool","dir":"","previous_headings":"Using the package > Reviewing model structure","what":"Using the LLM function summary tool","title":"An R package designed to aid in verification of health economic decision models","text":"use LLM function summary tool follow guide .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"internal-checks-for-modellers","dir":"","previous_headings":"Using the package","what":"Internal checks for modellers","title":"An R package designed to aid in verification of health economic decision models","text":"package series functions used within models check objects created conform standard rules (e.g. probabilities 0 1). code shows basic example shows use check_trans_prob_array ensure time dependent transition probability array balanced.","code":"library(assertHE) # create a transition probability array n_t <- 1000 # number of cycles v_hs_names <- c(\"H\", \"S\", \"D\") # health states n_hs <- length(v_hs_names) # create array of transition probabilities a_P <- array( data = 0, dim = c(n_hs, n_hs, n_t), dimnames = list(v_hs_names, v_hs_names, 1:n_t) ) # fill in transition probabilities for main transitions. a_P[\"H\", \"S\",] <- 0.3 a_P[\"H\", \"D\",] <- 0.01 a_P[\"S\", \"D\",] <- 0.1 a_P[\"S\", \"H\",] <- 0.5 # Fill in the proportion remaining in health state in each slice. # This is the remainder after all other transitions are accounted for. for(x in 1:n_t){ diag(a_P[,,x]) <- 1 - rowSums(a_P[,,x]) } # Use the function from the package. # This check should return no error, the array is symmetric, numeric, values # are between 0 and 1 and all rows sum to 1. # Note: stop_if_not = F returns warnings, stop_if_not = T returns errors. check_trans_prob_array(a_P = a_P, stop_if_not = T) # We can introduce an error to see the output # In this case, we set the first 10 cycles of transition from H to S to 0. # This means that the rows don't sum to 1 for the H row for 1:10 cycle. a_P[\"H\", \"S\", 1:10] <- 0 check_trans_prob_array(a_P = a_P, stop_if_not = F) # The output looks like this: # Warning message: # In check_array_rows_balanced(a_P, stop_if_not = stop_if_not) : # Not valid transition probabilities # Transition probabilities not valid from Health States: # 1 H; at cycle 1 # 2 H; at cycle 2 # 3 H; at cycle 3 # 4 H; at cycle 4 # 5 H; at cycle 5 # 6 H; at cycle 6 # 7 H; at cycle 7 # 8 H; at cycle 8 # 9 H; at cycle 9 # 10 H; at cycle 10"},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"using-the-package-to-review-models","dir":"","previous_headings":"","what":"Using the package to review models","title":"An R package designed to aid in verification of health economic decision models","text":"Please get contact like use package help review model R. following models visualized using package, test cases: NICE RCC Model sicksickerPack teaching model contained package. cdx2cea described Alarid-Escudero et al. 2022 DOACs-AF-Economic-model developed Bristol University CGD AMR Cost model - press. Embedding Economics Analysis Diabetes Microsimulation model described (press). Several internal models Dark Peak Analytics. Several internal models Maple Health. National Institute Health Care Excellence (NICE) built assertHE visualiser template model reviews. Health Economics Modelling Packages: - voi R package reviewed GSK team.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"sharing-interactive-model-networks","dir":"","previous_headings":"","what":"Sharing interactive model networks","title":"An R package designed to aid in verification of health economic decision models","text":"model generated, possible share HTML interactive network. visualisation tab click downward arrow ‘export’ button click ‘save web page’. visualisation HTML file may take load large networks. However, funtionality HTML version (shiny version links) .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/index.html","id":"get-in-contact","dir":"","previous_headings":"","what":"Get in contact","title":"An R package designed to aid in verification of health economic decision models","text":"get contact project collaborations please feel free message . Dr. Robert Smith Contact: rsmith@darkpeakanalytics.com Website: Dark Peak Analytics","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Check and initialize a vector — check_init","title":"Check and initialize a vector — check_init","text":"function checks given vector several conditions, including values within range 0 1 inclusive, sum values equal 1, duplicate names, elements names.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check and initialize a vector — check_init","text":"","code":"check_init(x)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check and initialize a vector — check_init","text":"x numeric vector named elements.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check and initialize a vector — check_init","text":"successful message, otherwise, issues warnings informative messages failed condition.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check and initialize a vector — check_init","text":"","code":"if (FALSE) { # \\dontrun{ x <- setNames(object = c(0.2, 0.3, 0.4, 0.1), nm = letters[1:4]) check_init(x) # Should issue warnings for values outside 0-1 and the sum not equal to 1 x <- c(0.2, 0.3, 0.4, 0.1) # Missing names check_init(x) # Should issue a warning about missing names x <- c(-2, 0.3, 0.4, 0.1) # Missing names check_init(x) # Should issue a warning about a value below 0 and about not summing to 1 } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Markov Trace — check_markov_trace","title":"Check Markov Trace — check_markov_trace","text":"function checks properties markov trace conform expectations. : numeric, values 0 1 rows summing 1. Also allows users check dead state monotonically decreasing (provided)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Markov Trace — check_markov_trace","text":"","code":"check_markov_trace(m_TR, dead_state = NULL, confirm_ok = F, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Markov Trace — check_markov_trace","text":"m_TR markov trace checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") confirm_ok OK, return message confirming checks passed. stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Markov Trace — check_markov_trace","text":"message indicating whether matrix passed checks error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_markov_trace.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Markov Trace — check_markov_trace","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) n_t <- 10 m_TR <- matrix(data = NA, nrow = n_t, ncol = n_hs, dimnames = list(NULL, v_hs_names)) m_TR[, \"H\"] <- seq(1, 0, length.out = n_t) m_TR[, \"S\"] <- seq(0, 0.5, length.out = n_t) m_TR[, \"D\"] <- 1 - m_TR[, \"H\"] - m_TR[, \"S\"] check_markov_trace(m_TR = m_TR, dead_state = \"D\", confirm_ok = T) m_TR[10, \"D\"] <- 0 m_TR[9, \"S\"] <- 1 check_markov_trace(m_TR = m_TR, stop_if_not = T, dead_state = \"D\", confirm_ok = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Transition Probability Array — check_trans_prob_array","title":"Check Transition Probability Array — check_trans_prob_array","text":"function checks properties transition probability array 2 three dimensions conform standard expectations. slice : symmetric, numeric, values 0 1 rows summing 1. dead state provided, checks dead state -> dead state probability slice equal 1.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Transition Probability Array — check_trans_prob_array","text":"","code":"check_trans_prob_array(a_P, dead_state = NULL, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Transition Probability Array — check_trans_prob_array","text":"a_P transition probability array checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Transition Probability Array — check_trans_prob_array","text":"message indicating whether array passed checks warning/error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_array.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Transition Probability Array — check_trans_prob_array","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) a_P <- array( data = 0, dim = c(n_hs, n_hs, 1000), dimnames = list(v_hs_names, v_hs_names, 1:1000) ) a_P[\"H\", \"S\",] <- 0.3 a_P[\"H\", \"D\",] <- 0.01 a_P[\"S\", \"D\",] <- 0.1 a_P[\"S\", \"H\",] <- 0.5 for(x in 1:1000){ diag(a_P[,,x]) <- 1 - rowSums(a_P[,,x]) } check_trans_prob_array(a_P = a_P, stop_if_not = F) # introduce error a_P[\"H\", \"S\", 1:10] <- 0 check_trans_prob_array(a_P = a_P, stop_if_not = F) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":null,"dir":"Reference","previous_headings":"","what":"Check Transition Probability Matrix — check_trans_prob_mat","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"function checks properties transition probability matrix conform standard expectations. : symmetric, numeric, values 0 1 rows summing 1. dead state provided, checks dead state -> dead state probability 1.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"","code":"check_trans_prob_mat(m_P, dead_state = NULL, confirm_ok = F, stop_if_not = F)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"m_P transition probability matrix checked. dead_state character vector length 1 denoting dead state (e.g. \"D\") confirm_ok OK, return message confirming checks passed. stop_if_not return error messages. default (F) returns warnings.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"message indicating whether matrix passed checks warning/error message check failed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/check_trans_prob_mat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Check Transition Probability Matrix — check_trans_prob_mat","text":"","code":"if (FALSE) { # \\dontrun{ v_hs_names <- c(\"H\", \"S\", \"D\") n_hs <- length(v_hs_names) m_P <- matrix(data = 0, nrow = n_hs, ncol = n_hs, dimnames = list(v_hs_names, v_hs_names)) m_P[\"H\", \"S\"] <- 0.3 m_P[\"H\", \"D\"] <- 0.01 m_P[\"S\", \"D\"] <- 0.1 m_P[\"S\", \"H\"] <- 0.5 diag(m_P) <- (1 - rowSums(m_P)) check_trans_prob_mat(m_P) # introduce error m_P[\"H\", \"S\"] <- 0.2 check_trans_prob_mat(m_P, confirm_ok = T, stop_if_not = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a prompt for a LLM — create_prompt","title":"Create a prompt for a LLM — create_prompt","text":"Uses function arguments function body inputs create prompt LLM.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a prompt for a LLM — create_prompt","text":"","code":"create_prompt(foo_arguments, foo_body, foo_name, foo_desc, foo_title)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a prompt for a LLM — create_prompt","text":"foo_arguments arguments function foo_body body function foo_name function name foo_desc function description foo_title function title","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a prompt for a LLM — create_prompt","text":"single prompt form character string","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/create_prompt.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a prompt for a LLM — create_prompt","text":"","code":"if (FALSE) { # \\dontrun{ create_prompt( foo_arguments = LETTERS[1:3], foo_body = \"D <- A+B+C; return(D)\", foo_name = \"calculate_QALYs\", foo_desc = \"This function calcs QALYs\", foo_title = \"Calculate the QALYs\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Shiny app server logic — define_app_server","title":"Create Shiny app server logic — define_app_server","text":"Create Shiny app server logic","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Shiny app server logic — define_app_server","text":"","code":"define_app_server(network_object, project_path, foo_path)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Shiny app server logic — define_app_server","text":"network_object visNetwork object displayed shiny app project_path Path project directory foo_path path function folder","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_server.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Shiny app server logic — define_app_server","text":"Shiny app server logic","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":null,"dir":"Reference","previous_headings":"","what":"Create Shiny app UI — define_app_ui","title":"Create Shiny app UI — define_app_ui","text":"Create Shiny app UI","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create Shiny app UI — define_app_ui","text":"","code":"define_app_ui(network_title)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create Shiny app UI — define_app_ui","text":"network_title Character string representing title network displayed network.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/define_app_ui.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create Shiny app UI — define_app_ui","text":"Shiny app user interface","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":null,"dir":"Reference","previous_headings":"","what":"Called By — .called_by","title":"Called By — .called_by","text":"Identify functions called given function within specified project folder","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Called By — .called_by","text":"","code":".called_by(fname, all_functions, pkg_env)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Called By — .called_by","text":"fname name target function. all_functions character vector function names project. pkg_env package environment functions defined (e.g. global).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Called By — .called_by","text":"data.table two columns (\"\" \"\") representing dependencies target function. Returns NA dependencies found.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Called By — .called_by","text":"function identifies functions called target function fname within specified package environment pkg_env. searches dependencies within literal code function body returns data.table two columns (\"\" \"\") representing dependencies. dependencies found, returns data.table \"\" target function \"\" NA. Note: function may potentially miss calls attributes closure. example function defined within another function, capturing environment outer function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-called_by.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Called By — .called_by","text":"","code":"if (FALSE) { # \\dontrun{ # Identify functions called by a specific function .called_by( fname = \"my_function\", all_functions = c(\"function1\", \"function2\", \"function3\"), pkg_env = environment()) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Parse Function — .parse_function","title":"Parse Function — .parse_function","text":"function parses R expression, breaking components.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parse Function — .parse_function","text":"","code":".parse_function(x)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parse Function — .parse_function","text":"x R expression parsed.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parse Function — .parse_function","text":"character string list parsed components, depending input expression.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Parse Function — .parse_function","text":"input expression x atomic value, symbol, environment pointer, function breaks list components. also handles expressions form foo$bar splitting , keeping relevant parts parsing. x list expressions, function recursively parses expression can longer listed, filtering atomic values process. x listable (e.g. function), deparsed character string.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/dot-parse_function.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parse Function — .parse_function","text":"","code":"if (FALSE) { # \\dontrun{ # Parse a simple expression tmp <- dplyr::across .parse_function(tmp) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract function name from a string — extract_function_name","title":"Extract function name from a string — extract_function_name","text":"Extract function name long string. works identifying \"function(\" string finding operand splitting keeping character .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract function name from a string — extract_function_name","text":"","code":"extract_function_name(string)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract function name from a string — extract_function_name","text":"string string containing function definition, must contain word 'function'","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/extract_function_name.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract function name from a string — extract_function_name","text":"string containing function name","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":null,"dir":"Reference","previous_headings":"","what":"find_files — find_files","title":"find_files — find_files","text":"Find files based upon regular expression searching IMPORTANT - Directory file. (instances file systems)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"find_files — find_files","text":"","code":"find_files( file_regx = \".R\", path = \".\", recursive = TRUE, exclude_files = NULL, exclude_dirs = NULL )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"find_files — find_files","text":"file_regx = \".*\" - regular expression files source path = \".\" - path search recursive = TRUE - recurse subdirectories exclude_files = NULL - regx files exclude exclude_dirs = NULL - regx directories exclude","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"find_files — find_files","text":"list files","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"Applies find_function_definitions file folder aggregate results","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"","code":"find_folder_function_definitions( foo_folder = \".\", f_excl = NULL, d_excl = NULL )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"foo_folder folder apply find_function_definitions script . f_excl regular expression files process (basename) d_excl regular expression directories process (dirname)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_folder_function_definitions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates summary of R files in folder with functions defined within and locations. — find_folder_function_definitions","text":"dataframe containing column function string column function location.","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":null,"dir":"Reference","previous_headings":"","what":"Find all function calls in file — find_function_calls_in_file","title":"Find all function calls in file — find_function_calls_in_file","text":"Searches file function calls using SYMBOL_FUNCTION_CALL","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find all function calls in file — find_function_calls_in_file","text":"","code":"find_function_calls_in_file( relative_path = NULL, foo_strings, filter_for_test_that = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find all function calls in file — find_function_calls_in_file","text":"relative_path path file search foo_strings string vector function names search filter_for_test_that whether filter functions used call test_that. Default FALSE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find all function calls in file — find_function_calls_in_file","text":"dataframe columns 'foo' function name 'location' gives file function called line function called appended.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_file.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find all function calls in file — find_function_calls_in_file","text":"","code":"if (FALSE) { # \\dontrun{ find_function_calls_in_file( relative_path = \"tests/testthat/example_project/tests/testthat/test-calculate_costs.R\", foo_strings = \"calculate_costs\" ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":null,"dir":"Reference","previous_headings":"","what":"Find specific function calls in a folder — find_function_calls_in_folder","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"Runs find_function_calls_in_file files folder, combined results single dataframe","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"","code":"find_function_calls_in_folder( test_folder, foo_strings, filter_for_test_that = F )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"test_folder folder containing tests foo_strings string vector function names search filter_for_test_that whether filter functions used call test_that. Default FALSE.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"dataframe two columns. 'foo' contains function names, location contains location tests function (file line number).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_calls_in_folder.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find specific function calls in a folder — find_function_calls_in_folder","text":"","code":"if (FALSE) { # \\dontrun{ find_function_calls_in_folder(foo_strings = c(\"calculate_costs\", \"calculate_QALYs\", \"create_Markov_trace\", \"FOO_WITH_NO_TESTS\"), test_folder = \"./tests/testthat/example_project/tests/testthat\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":null,"dir":"Reference","previous_headings":"","what":"Parses an R source file, returns function names defined within. — find_function_definitions","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"Using utils::getParseData(), searches function definitions matching FUNCTION keyword (.e. \"function\") associated SYMBOL (.e function name)","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"","code":"find_function_definitions(filename)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"filename string containing path R source file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"dataframe interesting information","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_function_definitions.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Parses an R source file, returns function names defined within. — find_function_definitions","text":"","code":"if (FALSE) { # \\dontrun{ find_function_definitions(filename = \"tests/testthat/example_scripts/example_tricky_functions.R\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the next element of the vector after a value — find_next_vector_element","title":"Find the next element of the vector after a value — find_next_vector_element","text":"Find next element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the next element of the vector after a value — find_next_vector_element","text":"","code":"find_next_vector_element(value, vector, LTE = FALSE)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the next element of the vector after a value — find_next_vector_element","text":"value value numeric values vector vector numeric values LTE boolean determine collection \"greater equal\"","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the next element of the vector after a value — find_next_vector_element","text":"next element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_next_vector_element.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the next element of the vector after a value — find_next_vector_element","text":"","code":"if (FALSE) { # \\dontrun{ find_next_vector_element(value = 5, vector = 1:10) find_next_vector_element(value = 5, vector = 1:4) find_next_vector_element(value = 5, vector = 1:5, LTE = F) find_next_vector_element(value = 5, vector = 1:5, LTE = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Find the previous element of the vector before a value — find_previous_vector_element","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"Find previous element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"","code":"find_previous_vector_element(value, vector, LTE = FALSE)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"value value numeric values vector vector numeric values LTE boolean determine collection \"less \" \"less equal\"","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"previous element vector value","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/find_previous_vector_element.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find the previous element of the vector before a value — find_previous_vector_element","text":"","code":"if (FALSE) { # \\dontrun{ find_previous_vector_element(value = 5, vector = 1:10) find_previous_vector_element(value = 5, vector = 6:10) find_previous_vector_element(value = 5, vector = 5:10, LTE = F) find_previous_vector_element(value = 5, vector = 5:10, LTE = T) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":null,"dir":"Reference","previous_headings":"","what":"get all active functions that exist in the global environment — get_active_functions","title":"get all active functions that exist in the global environment — get_active_functions","text":"get active functions exist global environment","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"get all active functions that exist in the global environment — get_active_functions","text":"","code":"get_active_functions(packages = \"assertHE\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"get all active functions that exist in the global environment — get_active_functions","text":"packages vector containing names packages include search","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_active_functions.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"get all active functions that exist in the global environment — get_active_functions","text":"vector containing names active functions global environment","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":null,"dir":"Reference","previous_headings":"","what":"Get cheers classification tags from a given file — get_file_cheers_classifications","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"provided filepath, identify cheers classification tags function names follow .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"","code":"get_file_cheers_classifications( filename, cheers_pattern, function_pattern = \"(\\\\s|=|-)function\\\\(\" )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"filename string containing filepath file checked cheers_pattern string containing roxygen tag cheers used identifier function_pattern string containing pattern identify functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_file_cheers_classifications.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get cheers classification tags from a given file — get_file_cheers_classifications","text":"list containing cheers tags function names follow ","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":null,"dir":"Reference","previous_headings":"","what":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"provided folder path, identify cheers classification tags function names follow .","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"","code":"get_folder_cheers_classifications(path, cheers_pattern, path_ignore = \"tests/\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"path string containing filepath folder checked cheers_pattern string containing roxygen tag cheers used identifier path_ignore string containing pattern identify files ignore","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_folder_cheers_classifications.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get cheers classification tags from a given folder — get_folder_cheers_classifications","text":"list containing cheers tags function names follow ","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":null,"dir":"Reference","previous_headings":"","what":"Get coverage by function — get_foo_coverage","title":"Get coverage by function — get_foo_coverage","text":"Get coverage function","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get coverage by function — get_foo_coverage","text":"","code":"get_foo_coverage(foo_folder, test_folder)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get coverage by function — get_foo_coverage","text":"foo_folder folder containing functions test_folder folder containing tests","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get coverage by function — get_foo_coverage","text":"dataframe column functions column coverage","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_foo_coverage.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get coverage by function — get_foo_coverage","text":"","code":"if (FALSE) { # \\dontrun{ get_foo_coverage( foo_folder = \"tests/testthat/example_project/R\", test_folder = \"tests/testthat/example_project/tests/testthat\" ) get_foo_coverage( foo_folder = \"R\", test_folder = \"tests/testthat\" ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve Function data to a list — get_function_data","title":"Retrieve Function data to a list — get_function_data","text":"function retrieves data arguments body specified function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve Function data to a list — get_function_data","text":"","code":"get_function_data(foo_name, envir = environment())"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve Function data to a list — get_function_data","text":"foo_name name function retrieve data . envir environment look function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve Function data to a list — get_function_data","text":"list elements 'arguments' 'body' specified function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve Function data to a list — get_function_data","text":"","code":"if (FALSE) { # \\dontrun{ get_function_data(foo_name = \"create_Markov_trace\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract function line in file path — get_function_line","title":"Extract function line in file path — get_function_line","text":"Extract function line file path","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract function line in file path — get_function_line","text":"","code":"get_function_line(file_location)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract function line in file path — get_function_line","text":"file_location Character scalar specifying path file.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract function line in file path — get_function_line","text":"numeric scalar","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_line.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract function line in file path — get_function_line","text":"","code":"if (FALSE) { # \\dontrun{ cleaned_function_line <- get_function_line( file_location = \"tests/testthat/example_project/R/calculate_QALYs.R:L41\" ) cleaned_function_line <- get_function_line( file_location = c( \"tests/testthat/example_project/R/calculate_QALYs.R#L41\", \"tests/testthat/example_project/R/calculate_QALYs.R#L49\" ) ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove artefacts from file path — get_function_path","title":"Remove artefacts from file path — get_function_path","text":"Remove artefacts file path","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove artefacts from file path — get_function_path","text":"","code":"get_function_path(file_location, project_path)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove artefacts from file path — get_function_path","text":"file_location Character scalar specifying path file. project_path Character scalar specifying path project.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove artefacts from file path — get_function_path","text":"character scalar","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_function_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove artefacts from file path — get_function_path","text":"","code":"if (FALSE) { # \\dontrun{ cleaned_file_path <- get_function_path( file_location = \"tests/testthat/example_project/R/calculate_QALYs.R#L41\" ) cleaned_file_path <- get_function_path( file_location = c( \"tests/testthat/example_project/R/calculate_QALYs.R#L41\", \"tests/testthat/example_project/R/calculate_QALYs.R#L49\" ) ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Isolated Functions — get_isolated_foo","title":"Get Isolated Functions — get_isolated_foo","text":"Get Isolated Functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Isolated Functions — get_isolated_foo","text":"","code":"get_isolated_foo(df_edges)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Isolated Functions — get_isolated_foo","text":"df_edges data.table two columns (\"\" \"\") representing dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Isolated Functions — get_isolated_foo","text":"vector isolated function names.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_isolated_foo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Isolated Functions — get_isolated_foo","text":"","code":"if (FALSE) { # \\dontrun{ get_isolated_foo(df_edges = data.frame(from = c(\"a\", \"b\", \"c\", \"d\"), to = c(\"b\", \"c\", NA, NA))) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Title and Description from Parsed List — get_roxygen_description","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"function extracts title description parsed list.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"","code":"get_roxygen_description(parsed_list)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"parsed_list list containing parsed elements.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"list containing title description.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Title and Description from Parsed List — get_roxygen_description","text":"","code":"if (FALSE) { # \\dontrun{ parsed_list <- list(list(tag = \"title\", val = \"Sample Title\"), list(tag = \"description\", val = \"This is a sample description.\")) get_roxygen_description(parsed_list) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":null,"dir":"Reference","previous_headings":"","what":"Get roxygen title and description from function — get_roxygen_description_from_foo","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"Get roxygen title description function","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"","code":"get_roxygen_description_from_foo(foo_name)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"foo_name function want descriotion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"text containing description","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/get_roxygen_description_from_foo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get roxygen title and description from function — get_roxygen_description_from_foo","text":"","code":"if (FALSE) { # \\dontrun{ source_files(path = \"tests/testthat/example_project/R\", keep_source = TRUE) get_roxygen_description_from_foo(\"calculate_costs\") } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify Dependencies — identify_dependencies","title":"Identify Dependencies — identify_dependencies","text":"Identify dependencies functions.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify Dependencies — identify_dependencies","text":"","code":"identify_dependencies(v_unique_foo, pkg_env = environment())"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify Dependencies — identify_dependencies","text":"v_unique_foo Vector unique function strings. pkg_env package environment functions defined (e.g. global).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/identify_dependencies.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify Dependencies — identify_dependencies","text":"data.table two columns (\"\" \"\") representing dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":null,"dir":"Reference","previous_headings":"","what":"locate_funcs — locate_funcs","title":"locate_funcs — locate_funcs","text":"locates lines define function within single file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"locate_funcs — locate_funcs","text":"","code":"locate_funcs(file)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"locate_funcs — locate_funcs","text":"file = connection object character string path file.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"locate_funcs — locate_funcs","text":"Returns data frame following columns: func_num: ID function - monotonic increasing 1. func_start: line number (within file) function start. func_end: line number function end.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/locate_funcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"locate_funcs — locate_funcs","text":"","code":"if (FALSE) { # \\dontrun{ locate_funcs(file) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":null,"dir":"Reference","previous_headings":"","what":"Create closable shiny tab — make_closable_tab","title":"Create closable shiny tab — make_closable_tab","text":"Create closable shiny tab","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create closable shiny tab — make_closable_tab","text":"","code":"make_closable_tab(tab_name, content_output_Id, output_type = \"text\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create closable shiny tab — make_closable_tab","text":"tab_name Character scalar representing name title shiny tab. content_output_Id Character scalar representing id shiny tab. output_type Character scalar specifying type rendered output. Default \"text\" can also accept \"HTML\".","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/make_closable_tab.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create closable shiny tab — make_closable_tab","text":"tab can passed shiny::tabsetPanel()","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot Network — plotNetwork","title":"Plot Network — plotNetwork","text":"Visualize network plot using visNetwork package.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot Network — plotNetwork","text":"","code":"plotNetwork( df_edges, from_col = \"from\", to_col = \"to\", df_summary, df_coverage, color_no_test = c(background = \"#fad1d0\", border = \"#9c0000\", highlight = \"#9c0000\"), color_with_test = c(background = \"#e6ffe6\", border = \"#65a765\", highlight = \"#65a765\"), color_mod_coverage = c(background = \"#FFD580\", border = \"#E49B0F\", highlight = \"#E49B0F\"), moderate_coverage_range = c(0.2, 0.8), show_in_shiny = FALSE, network_title = NULL, scale_node_size_by_degree = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot Network — plotNetwork","text":"df_edges data frame containing columns \"\" \"\" representing edges network. from_col Name column df_edges representing source nodes. to_col Name column df_edges representing target nodes. df_summary summary dataframe containing information function. df_coverage summary dataframe function names test coverages color_no_test named vector hexcodes background, border highlight color_with_test named vector hexcodes background, border highlight color_mod_coverage named vector hexcodes background, border highlight coverage moderate moderate_coverage_range vector two values giving range defined moderate coverage. show_in_shiny logical scalar indicating whether prepare/deploy network using built shiny app. Default FALSE. network_title title network plot. scale_node_size_by_degree Scale node size degree centrality node.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot Network — plotNetwork","text":"visNetwork object representing network plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plotNetwork.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot Network — plotNetwork","text":"","code":"if (FALSE) { # \\dontrun{ # Plot a network from a data frame of edges plotNetwork(df_edges) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"function plots cumulative mean incremental net monetary benefit (INMB), incremental cost-effectiveness ratio (ICER), incremental costs, incremental effects different strategies compared specified comparator.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"","code":"plot_PSA_stability( m_eff, m_cost, lambda, currency_symbol = \"$\", v_strategy_labels = NULL, v_strategy_colors = NULL, comparator = NULL, output = \"inmb\", include_reference_line = T, log_x = F )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"m_eff Numeric matrix effects different strategies. m_cost Numeric matrix costs different strategies. lambda Numeric value specifying willingness--pay threshold ICER. currency_symbol String specifying currency symbol y-axis labels. v_strategy_labels Named vector strategy labels e.g. c(\"\" = \"Strategy \"). v_strategy_colors Named vector strategy colors e.g. c(\"\" = \"#665BA6\"). comparator Column name representing comparator strategy (e.g. \"\"). output String specifying type plot, limited : \"inmb\", \"icer\", \"costs\", \"effects\". include_reference_line Logical indicating whether include reference line. log_x Logical indicating whether use logarithmic scale x-axis.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"ggplot object representing cumulative mean PSA stability plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/plot_PSA_stability.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot cumulative mean Probabilistic Sensitivity Analysis results — plot_PSA_stability","text":"","code":"if (FALSE) { # \\dontrun{ # create example matrices m_eff <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$e)[,1:5] colnames(m_eff) <- LETTERS[1:length(colnames(m_eff))] m_cost <- as.matrix(gskVEOutils::Hyperphosphatemia_PSA$c)[,1:5] colnames(m_cost) <- LETTERS[1:length(colnames(m_cost))] v_strategy_labels <- setNames(object = paste0(\"Strategy \", colnames(m_eff)), nm = colnames(m_eff)) v_strategy_colors <- setNames(object = grDevices::palette.colors(n = ncol(m_eff)), nm = colnames(m_eff)) plot_PSA_stability(m_eff = m_eff[, 1:5], m_cost = m_cost[, 1:5], lambda = 20000, currency_symbol = \"\\u0024\", v_strategy_labels = v_strategy_labels, v_strategy_colors = v_strategy_colors, comparator = colnames(m_eff)[1], output = \"icer\", include_reference_line = T, log_x = F) } # } # end don't run."},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":null,"dir":"Reference","previous_headings":"","what":"Process Nodes — processNodes","title":"Process Nodes — processNodes","text":"Process unique nodes dataframe edges.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Process Nodes — processNodes","text":"","code":"processNodes(df_edges, from_col = \"from\", to_col = \"to\")"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Process Nodes — processNodes","text":"df_edges data frame containing columns \"\" \"\" representing edges network. from_col Name column df_edges representing source nodes. to_col Name column df_edges representing target nodes.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/processNodes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Process Nodes — processNodes","text":"data frame unique nodes labels.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the content from the output of the LLM — return_message","title":"Extract the content from the output of the LLM — return_message","text":"Extracts content prints number tokens used message.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the content from the output of the LLM — return_message","text":"","code":"return_message(API_response, verbose = T)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the content from the output of the LLM — return_message","text":"API_response response LLM API verbose whether include message number token's used","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/return_message.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the content from the output of the LLM — return_message","text":"single string summary content LLM response","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":null,"dir":"Reference","previous_headings":"","what":"Run a Shiny app to host a network visualization — run_shiny_app","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"Run Shiny app host network visualization","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"","code":"run_shiny_app( uiFunction = define_app_ui, serverFunction = define_app_server, network_object, network_title = \"Function Network\", project_path, foo_path )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"uiFunction Function defining shiny user-interface serverFunction Function defining shiny server logic network_object visNetwork object displayed shiny app network_title Title displayed hte app title project_path Path project directory foo_path Path function folder","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"shiny app","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/run_shiny_app.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Run a Shiny app to host a network visualization — run_shiny_app","text":"","code":"if (FALSE) { # \\dontrun{ network_object <- visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE ) run_shiny_app(network_object = network_object) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":null,"dir":"Reference","previous_headings":"","what":"source_files — source_files","title":"source_files — source_files","text":"Source files based upon regular expression searching","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_files — source_files","text":"","code":"source_files( file_regx = \".R\", path = \".\", recursive = TRUE, exclude_files = NULL, exclude_dirs = NULL, funcs_only = FALSE, verbose = FALSE, keep_source = FALSE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_files — source_files","text":"file_regx = \".*\" - regular expression files source path = \".\" - path search recursive = TRUE - recurse subdirectories exclude_files = NULL - regx files exclude exclude_dirs = NULL - regx directories exclude funcs_only = FALSE - source identified functions, whole file verbose = FALSE - whether emit sourced files. keep_source = FALSE - whether keep source data using source.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"source_files — source_files","text":"list files sourced","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_files.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_files — source_files","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":[]},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":null,"dir":"Reference","previous_headings":"","what":"source_funcs — source_funcs","title":"source_funcs — source_funcs","text":"Sources functions discovered R file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_funcs — source_funcs","text":"","code":"source_funcs(file, env = .GlobalEnv)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_funcs — source_funcs","text":"file = connection object character string path file. env environment source functions","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_funcs — source_funcs","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_funcs.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"source_funcs — source_funcs","text":"","code":"if (FALSE) { # \\dontrun{ file <- \"/file.R\" source_funcs(file) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":null,"dir":"Reference","previous_headings":"","what":"source_lines — source_lines","title":"source_lines — source_lines","text":"Sources specified lines within single file","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"source_lines — source_lines","text":"","code":"source_lines(file, lines, env = .GlobalEnv)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"source_lines — source_lines","text":"file = connection object character string path file. lines = vector integers specifying lines sourced. env environment source lines","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"important-","dir":"Reference","previous_headings":"","what":"IMPORTANT !!!","title":"source_lines — source_lines","text":"sourcing file mistake - may result infinite recursion","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/source_lines.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"source_lines — source_lines","text":"","code":"if (FALSE) { # \\dontrun{ source_lines(file = \"PATH/filename\", ## any file name, or a Connection object lines = c(4, 5, 6) ) ## source lines 4-6 } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"Summarise function using LLM via API retrieve result","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"","code":"summarise_function_from_arguments_and_body( foo_name, foo_arguments, foo_body, foo_title, foo_desc, model_name = \"gpt-3.5-turbo-0125\", llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\") )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"foo_name function name foo_arguments vector arguments foo_body single character containing unparsed body foo_title function title foo_desc function description model_name name LLM use (default gpt-3.5-turbo-0125) llm_api_url url API LLM llm_api_key key API LLM","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"response LLM containing pertinant information & tokens used","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_from_arguments_and_body.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise a function from its arguments and body — summarise_function_from_arguments_and_body","text":"","code":"if (FALSE) { # \\dontrun{ tmp <- summarise_function_from_arguments_and_body( foo_arguments = LETTERS[1:3], foo_body = \"D <- A+B+C; return(D)\", model_name = \"gpt-3.5-turbo-0125\", llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\"), foo_desc = \"add three numbers, these numbers relate to the number of apples on three trees\", foo_title = \"apple adder\", foo_name = \"apple_add\" ) httr::content(tmp) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize a function using a Large Language Model — summarise_function_with_LLM","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"function summarizes another function using Language Model.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"","code":"summarise_function_with_LLM( foo_name, llm_api_url = Sys.getenv(\"LLM_API_URL\"), llm_api_key = Sys.getenv(\"LLM_API_KEY\"), envir = environment() )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"foo_name function name llm_api_url url API LLM llm_api_key key API LLM envir environment look function.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"character string summary function based arguments body.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_function_with_LLM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize a function using a Large Language Model — summarise_function_with_LLM","text":"","code":"if (FALSE) { # \\dontrun{ summarise_function_with_LLM(foo_name = \"get_active_functions\", envir = rlang::ns_env(\"assertHE\")) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarise the model functions in a single folder. — summarise_model","title":"Summarise the model functions in a single folder. — summarise_model","text":"Summarise model functions single folder.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarise the model functions in a single folder. — summarise_model","text":"","code":"summarise_model( project_path = \".\", foo_folder = \"R\", exclude_files = NULL, exclude_dirs = NULL, test_folder = NULL, output_format = \"dataframe\" )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarise the model functions in a single folder. — summarise_model","text":"project_path path project folder, provided, use current working directory. foo_folder path folder containing functions model exclude_files regular expression files process (basename) exclude_dirs regular expression directories process (dirname) test_folder folder containing tests output_format output format use, defaults dataframe, options include latex word.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Summarise the model functions in a single folder. — summarise_model","text":"dataframe three columns. 'foo_string' contains function names, 'foo_location' contains location function definitions, 'test_location' contains locations tests function (file line number).","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/summarise_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarise the model functions in a single folder. — summarise_model","text":"","code":"if (FALSE) { # \\dontrun{ project_path <- \"tests/testthat/example_project\" foo_folder <- \"R\" test_folder <- \"tests/testthat\" summarise_model(project_path = \"./tests/testthat/example_project\", foo_folder = foo_folder, test_folder = test_folder) summarise_model(foo_folder = foo_folder, test_folder = NULL) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":null,"dir":"Reference","previous_headings":"","what":"Visualize Project — visualise_project","title":"Visualize Project — visualise_project","text":"Visualize dependencies functions project using network plot.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Visualize Project — visualise_project","text":"","code":"visualise_project( project_path, foo_path = \"R\", test_path = NULL, exclude_files = NULL, exclude_dirs = NULL, run_coverage = F, color_no_test = c(background = \"#fad1d0\", border = \"#9c0000\", highlight = \"#9c0000\"), color_with_test = c(background = \"#e6ffe6\", border = \"#65a765\", highlight = \"#65a765\"), color_mod_coverage = c(background = \"#FFD580\", border = \"#E49B0F\", highlight = \"#E49B0F\"), moderate_coverage_range = c(0.2, 0.8), print_isolated_foo = FALSE, show_in_shiny = FALSE, network_title = \"Function Network\", scale_node_size_by_degree = TRUE )"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Visualize Project — visualise_project","text":"project_path Path project folder. foo_path Path folder containing foo functions. test_path Path folder containing test functions. exclude_files regular expression files process (basename) exclude_dirs regular expression directories process (dirname) run_coverage Boolean determining whether run coverage assessment color_no_test named vector hexcodes background, border highlight color_with_test named vector hexcodes background, border highlight color_mod_coverage named vector hexcodes background, border highlight coverage moderate moderate_coverage_range vector two values giving range defined moderate coverage. print_isolated_foo Print isolated functions console (default false) show_in_shiny logical scalar indicating whether prepare/deploy network using built shiny app. Default FALSE. network_title title network plot. scale_node_size_by_degree Scale node size degree centrality node.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Visualize Project — visualise_project","text":"visNetwork object representing network plot function dependencies.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/visualise_project.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Visualize Project — visualise_project","text":"","code":"if (FALSE) { # \\dontrun{ # Visualize project dependencies in HTML visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE ) # Visualize project dependencies in shiny visualise_project( project_path = \"tests/testthat/example_project\", foo_path = \"R\", test_path = \"tests/testthat\", run_coverage = TRUE, show_in_shiny = TRUE ) } # }"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrap a string to lines of a specified width — wrap_string","title":"Wrap a string to lines of a specified width — wrap_string","text":"function takes input string wraps lines specified width, breaking string word boundaries.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrap a string to lines of a specified width — wrap_string","text":"","code":"wrap_string(input_string, width = 80)"},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrap a string to lines of a specified width — wrap_string","text":"input_string input string wrapped. width maximum width line. Default 80 characters.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrap a string to lines of a specified width — wrap_string","text":"character vector element represents line wrapped string.","code":""},{"path":"https://dark-peak-analytics.github.io/assertHE/reference/wrap_string.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Wrap a string to lines of a specified width — wrap_string","text":"","code":"input_string <- \"This is a long string that needs to be wrapped to fit within a specified width.\" wrapped_lines <- wrap_string(input_string, width = 30) cat(wrapped_lines, sep = \"\\n\") #> #> This is a long string that #> needs to be wrapped to fit #> within #> a #> specified width."}]