Get Result Value

get_result(
  study,
  result = NULL,
  analysis_id = 1,
  digits = getOption("digits", 3),
  return = c("value", "char", "html"),
  analysis_link = ""
)

Arguments

study

A study list object with class scivrs_study

result

The name of the result value to retrieve (omit to return all results)

analysis_id

The id for the relevant analysis (index or character) defaults to the first analysis in the list

digits

Number of digits to round to (defaults to the value for options("digits")

return

Return the value, character version, or an html linked version

analysis_link

Name of the analysis file to link to if linking to html

Value

value of names result or list of results or html version

Examples

s <- study() %>%
  add_hypothesis("H1", "Petals are wider than long") %>%
  add_analysis("A1", t.test(iris$Petal.Width, iris$Petal.Height)) %>%
  add_criterion("p", "p.value", "<", .05) %>%
  study_analyse()
#> Hypothesis H1 has no evaluation criteria for corroboration
#> Hypothesis H1 has no evaluation criteria for falsification
#> Hypothesis H1: Petals are wider than long
#> 
#> Criterion p:
#> * p.value < 0.05 is TRUE
#> * p.value = 0.000
#> 
#> Conclusion: inconclusive
#> * Corroborate (*no criteria*): FALSE
#> * Falsify (*no criteria*): FALSE

 get_result(s, "p.value", "A1")
#> [1] 0