## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----basic-------------------------------------------------------------------- library(effectcheck) # Check a single APA-style result result <- check_text("t(28) = 2.21, p = .035, d = 0.80") print(result) ## ----multiple----------------------------------------------------------------- text <- " Study 1 found a significant effect, t(45) = 3.12, p = .003, d = 0.91. The ANOVA revealed a main effect, F(2, 87) = 5.44, p = .006. The correlation was significant, r(48) = .42, p = .003. " results <- check_text(text) summary(results) ## ----filter------------------------------------------------------------------- # Filter by status errors <- get_errors(results) warnings <- get_warnings(results) # Filter by test type t_tests <- filter_by_test_type(results, "t") # Get counts count_by(results, "test_type") ## ----variants----------------------------------------------------------------- result <- check_text("t(28) = 2.21, p = .035, d = 0.80") # See all computed variants for the first result format_variants(result, 1) # Get metadata about a specific variant type get_variant_metadata("d_ind") ## ----files, eval=FALSE-------------------------------------------------------- # # Single file # result <- check_file("manuscript.pdf") # # # Multiple files # results <- check_files(c("study1.pdf", "study2.html")) # # # Entire directory # results <- check_dir("manuscripts/") ## ----export, eval=FALSE------------------------------------------------------- # results <- check_text("t(28) = 2.21, p = .035, d = 0.80") # # # HTML report # generate_report(results, out = file.path(tempdir(), "report.html")) # # # CSV/JSON export # export_csv(results, out = file.path(tempdir(), "results.csv")) # export_json(results, out = file.path(tempdir(), "results.json")) ## ----statcheck, eval=FALSE---------------------------------------------------- # comp <- compare_with_statcheck("t(28) = 2.21, p = .035, d = 0.80") # print(comp)