Update a criterion
update_criterion( study, id, result = NULL, operator = NULL, comparator = NULL, analysis_id = NULL, hypothesis_id = NULL, new_id = NULL )
study | A study list object with class scivrs_study |
---|---|
id | A unique name to refer to the criterion with in the evaluation |
result | The name of the item in the analysis results list to compare |
operator | The operator for comparison c("<", "=", ">", "!=") |
comparator | The value to compare |
analysis_id | The id for the relevant analysis (index or character) if NULL, assigns to the last analysis in the list |
hypothesis_id | The id for the hypothesis (index or character) if NULL, assigns to the last hypothesis in the list |
new_id | A new (character) ID for this criterion |
A study object with class scivrs_study
s <- study() %>% add_hypothesis("H1") %>% add_analysis("A1", t.test(rnorm(100))) %>% add_criterion("p", "p.value", ">", 0.05) %>% study_analyse()#>#>#>#> #> #> #> #> #> #> #>s <- update_criterion(s, "p", operator = "<", analysis_id = "A1", hypothesis_id = "H1" ) %>% study_analyse()#>#>#>#> #> #> #> #> #> #> #>