Add a criterion to a hypothesis in a study object
add_criterion(
study,
id,
result,
operator,
comparator,
analysis_id = NULL,
hypothesis_id = NULL
)
A study list object with class scivrs_study
A unique name to refer to the criterion with in the evaluation
The name of the item in the analysis results list to compare
The operator for comparison c("<", "=", ">", "!=")
The value to compare
The id for the relevant analysis (index or character) if NULL, assigns to the last analysis in the list
The id for the hypothesis (index or character) if NULL, assigns to the last hypothesis in the list
A study object with class scivrs_study
s <- study() %>%
add_hypothesis("H1", "Petal width and length will be positively correlated.") %>%
add_analysis("A1", cor.test(dat$Petal.Width, dat$Petal.Length)) %>%
add_criterion("sig", "p.value", "<", 0.05) %>%
add_criterion("pos", "estimate", ">", 0)