cocoon
Extract, Format, and Print Statistical Output
v0.3.0
·
Feb 7, 2026
·
GPL (>= 3)
Description
Provides functions that format statistical output in a way that can be inserted into R Markdown documents. This is analogous to the apa_print() functions in the 'papaja' package but prints Markdown or LaTeX syntax.
Downloads
271
Last 30 days
15480th
757
Last 90 days
4.2K
Last year
Trend: +42.6% (30d vs prior 30d)
CRAN Check Status
5
ERROR
8
OK
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | ERROR |
| r-devel-linux-x86_64-debian-gcc | ERROR |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-windows-x86_64 | ERROR |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (5 non-OK)
ERROR
r-devel-linux-x86_64-debian-clang
tests
Running ‘testthat.R’ [12s/17s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(cocoon)
>
> test_check("cocoon")
Saving _problems/test-format_stats_htest-270.R
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-format_statvalues.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-format_stats_htest.R:267:3'): formatting t-tests works properly ──
Expected `format_stats(test_ttest3)` to equal "_V_ = 27.0, _p_ = .634".
Differences:
`actual`: "_V_ = 32.0, _p_ = .645"
`expected`: "_V_ = 27.0, _p_ = .634"
Backtrace:
▆
1. ├─base::suppressMessages(...) at test-format_stats_htest.R:267:3
2. │ └─base::withCallingHandlers(...)
3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634")
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [9s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(cocoon)
>
> test_check("cocoon")
Saving _problems/test-format_stats_htest-270.R
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-format_statvalues.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-format_stats_htest.R:267:3'): formatting t-tests works properly ──
Expected `format_stats(test_ttest3)` to equal "_V_ = 27.0, _p_ = .634".
Differences:
`actual`: "_V_ = 32.0, _p_ = .645"
`expected`: "_V_ = 27.0, _p_ = .634"
Backtrace:
▆
1. ├─base::suppressMessages(...) at test-format_stats_htest.R:267:3
2. │ └─base::withCallingHandlers(...)
3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634")
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-linux-x86_64-fedora-clang
tests
Running ‘testthat.R’ [21s/52s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(cocoon)
>
> test_check("cocoon")
Saving _problems/test-format_stats_htest-270.R
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-format_statvalues.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-format_stats_htest.R:267:3'): formatting t-tests works properly ──
Expected `format_stats(test_ttest3)` to equal "_V_ = 27.0, _p_ = .634".
Differences:
`actual`: "_V_ = 32.0, _p_ = .645"
`expected`: "_V_ = 27.0, _p_ = .634"
Backtrace:
▆
1. ├─base::suppressMessages(...) at test-format_stats_htest.R:267:3
2. │ └─base::withCallingHandlers(...)
3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634")
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-linux-x86_64-fedora-gcc
tests
Running ‘testthat.R’ [19s/26s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(cocoon)
>
> test_check("cocoon")
Saving _problems/test-format_stats_htest-270.R
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-format_statvalues.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-format_stats_htest.R:267:3'): formatting t-tests works properly ──
Expected `format_stats(test_ttest3)` to equal "_V_ = 27.0, _p_ = .634".
Differences:
`actual`: "_V_ = 32.0, _p_ = .645"
`expected`: "_V_ = 27.0, _p_ = .634"
Backtrace:
▆
1. ├─base::suppressMessages(...) at test-format_stats_htest.R:267:3
2. │ └─base::withCallingHandlers(...)
3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634")
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
Error:
! Test failures.
Execution halted
ERROR
r-devel-windows-x86_64
tests
Running 'testthat.R' [10s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(cocoon)
>
> test_check("cocoon")
Saving _problems/test-format_stats_htest-270.R
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-format_statvalues.R:94:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-format_stats_htest.R:267:3'): formatting t-tests works properly ──
Expected `format_stats(test_ttest3)` to equal "_V_ = 27.0, _p_ = .634".
Differences:
`actual`: "_V_ = 32.0, _p_ = .645"
`expected`: "_V_ = 27.0, _p_ = .634"
Backtrace:
▆
1. ├─base::suppressMessages(...) at test-format_stats_htest.R:267:3
2. │ └─base::withCallingHandlers(...)
3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634")
[ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ]
Error:
! Test failures.
Execution halted
Check History
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 4, 2026
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [8s/9s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional te ...[truncated]... test-format_stats_htest.R:267:3 2. │ └─base::withCallingHandlers(...) 3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634") [ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ] Error: ! Test failures. Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 30, 2026
ERROR 10 OK · 0 NOTE · 0 WARNING · 3 ERROR · 0 FAILURE May 25, 2026
ERROR
r-devel-linux-x86_64-debian-gcc
tests
Running ‘testthat.R’ [8s/9s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional te ...[truncated]... test-format_stats_htest.R:267:3 2. │ └─base::withCallingHandlers(...) 3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634") [ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ] Error: ! Test failures. Execution halted
ERROR
r-devel-linux-x86_64-fedora-clang
tests
Running ‘testthat.R’ [22s/80s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional ...[truncated]... test-format_stats_htest.R:267:3 2. │ └─base::withCallingHandlers(...) 3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634") [ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ] Error: ! Test failures. Execution halted
ERROR
r-devel-linux-x86_64-fedora-gcc
tests
Running ‘testthat.R’ [22s/72s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional ...[truncated]... test-format_stats_htest.R:267:3 2. │ └─base::withCallingHandlers(...) 3. └─testthat::expect_equal(format_stats(test_ttest3), "_V_ = 27.0, _p_ = .634") [ FAIL 1 | WARN 42 | SKIP 1 | PASS 305 ] Error: ! Test failures. Execution halted