cocoon: An R package for extracting, formatting, and printing statistical output

Jeffrey R. Stevens · 2024

Formatting statistics from R statistical objects can be troublesome. One must first find, extract, and include the relevant statistical values, format the values properly with leading zeros and appropriate rounding, and format the statistical labels to match norms or style guides. Doing this with inline code can be messy and hard to read with mulitple functions working in tandem to complete the formatting. Existing packages can extract and format statistics, but they often return output formatted for specific style guides and lack flexibility to precisely control the formatting in other ways. The `{cocoon}` package allows for flexible formatting of statistical objects, statistical values, and numbers more generally to allow users to easily embed statistical information in their reproducible research documents.

Read the paper · More papers on PaperTik