Save the study framework to a JSON file
study_save(
  study,
  filename = NULL,
  format = c("json", "prereg", "postreg"),
  data_values = TRUE
)A study list object with class scivrs_study
The name to save the file if NULL, will save as the study name
Save as a machine-readable "json" file, a human-readable "prereg" document (no results) or a "postreg" document (includes results)
Whether to include data values in the JSON file (defaults to TRUE)
A study object with class scivrs_study
if (FALSE) {
study("iris") %>%
  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) %>%
  add_eval("corroboration",
           "Petal width is significantly and positively correlated to length",
           "sig & pos") %>%
  add_eval("falsification",
           "Petal width is significantly and negatively correlated to length",
           "sig & !pos") %>%
  add_data("dat", iris) %>%
  study_analyse() %>%
  study_save(format = "postreg")
}