Add a method to a study object

add_method(study, id = NULL, description = "Describe your method", ...)

Arguments

study

A study list object with class scivrs_study

id

The id for this method (index or character) if a method with this id already exists, it will overwrite it

description

The text description of the method

...

further arguments to add

Value

A study object with class scivrs_study

Examples


s <- study() %>%
  add_method("M1", "Description...")
study_to_json(s)
#> {
#>     "name": "Demo Study",
#>     "info": [],
#>     "authors": [],
#>     "hypotheses": [],
#>     "methods": [
#>         {
#>             "id": "M1",
#>             "description": "Description..."
#>         }
#>     ],
#>     "data": [],
#>     "analyses": []
#> }
#>