All report functions emit LaTeX text that relies on a small set of custom
commands. This helper prints the complete set, ready to paste into a
manuscript preamble, or writes it to a file that can be included with
\input{} (or renamed to .sty and loaded via
\usepackage).
Arguments
- path
Optional path of a
.texfile to write the definitions to. If the path ends in.sty, a\ProvidesPackageheader is added so it can be uploaded to Overleaf and loaded with\usepackage{colleyRstats}(see alsouse_colleyrstats_sty()).
Value
Invisibly returns the macro definitions as a character vector;
the text is also emitted via message().
Examples
latex_preamble()
#> % colleyRstats: LaTeX commands required by the report functions
#> \newcommand{\F}[3]{$F({#1},{#2})={#3}$}
#> \newcommand{\p}{\textit{p=}}
#> \newcommand{\pminor}{\textit{p$<$}}
#> \newcommand{\padj}{\textit{p$_{adj}$=}}
#> \newcommand{\padjminor}{\textit{p$_{adj}<$}}
#> \newcommand{\m}{\textit{M=}}
#> \newcommand{\sd}{\textit{SD=}}
#> \newcommand{\df}{\textit{df=}}
#> \newcommand{\chisq}{$\chi^2$}
#> \newcommand{\rankbiserial}[1]{$r_{rb} = #1$}
#> \newcommand{\effectsize}{\textit{r=}}