Skip to contents

siera ships a plain-text library of analysis-method code templates (the `templateCode` + parameters + valueSource recipes that drive ARD generation) under `inst/method-library`. This accessor lists the available methods and resolves the on-disk location of a method's files, so you do not have to call [system.file()] directly. Each method's stable `id` is the key intended for an ARS file to reference.

Usage

method_library(id = NULL)

Arguments

id

Method id (e.g. `"risk_difference"`). If `NULL` (default), the available method ids are returned.

Value

When `id` is `NULL`, a character vector of available method ids. Otherwise, the path to that method's directory (containing `method.json` and `template.R`).

Details

The human-readable catalog (`METHODS.md`) and the valueSource registry (`constructs.json`) live at the library root, i.e. `system.file("method-library", package = "siera")`.

Examples

method_library()
#>  [1] "anova"                                           
#>  [2] "categorical_summary"                             
#>  [3] "categorical_summary_per_predefined_group"        
#>  [4] "categorical_summary_per_predefined_group_overall"
#>  [5] "chisq"                                           
#>  [6] "chisq_per_predefined_group"                      
#>  [7] "continuous_summary"                              
#>  [8] "fishers_exact"                                   
#>  [9] "risk_difference"                                 
#> [10] "risk_difference_per_group"                       
#> [11] "risk_difference_per_group_pair"                  
#> [12] "risk_difference_per_predefined_group"            
#> [13] "total_n"                                         
method_library("risk_difference")
#> [1] "/home/runner/work/_temp/Library/siera/method-library/04_risk_difference"