Update a criterion

update_criterion(
  study,
  id,
  result = NULL,
  operator = NULL,
  comparator = NULL,
  analysis_id = NULL,
  hypothesis_id = NULL,
  new_id = NULL
)

Arguments

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

Value

A study object with class scivrs_study

Examples

s <- study() %>% add_hypothesis("H1") %>% add_analysis("A1", t.test(rnorm(100))) %>% add_criterion("p", "p.value", ">", 0.05) %>% study_analyse()
#> Hypothesis H1 has no evaluation criteria for corroboration
#> Hypothesis H1 has no evaluation criteria for falsification
#> Hypothesis H1: Describe your hypothesis #> #> Criterion p: #> * p.value > 0.05 is TRUE #> * p.value = 0.267 #> #> Conclusion: inconclusive #> * Corroborate (*no criteria*): FALSE #> * Falsify (*no criteria*): FALSE
s <- update_criterion(s, "p", operator = "<", analysis_id = "A1", hypothesis_id = "H1" ) %>% study_analyse()
#> Hypothesis H1 has no evaluation criteria for corroboration
#> Hypothesis H1 has no evaluation criteria for falsification
#> Hypothesis H1: Describe your hypothesis #> #> Criterion p: #> * p.value < 0.05 is FALSE #> * p.value = 0.109 #> #> Conclusion: inconclusive #> * Corroborate (*no criteria*): FALSE #> * Falsify (*no criteria*): FALSE