Skip to contents

The cells of a table from run_analysis_plan() as both report engines and sframe_format_result() print them, so a table shows the same numbers wherever it appears. A p value column shows 3 decimals with the APA 7 form .032, or <.001. A column bounded by 1, such as r, tau or alpha, uses its leading zero. Other numbers show 2 decimals, and whole numbers in an integer column, a column of counts (n, df, Frequency) or a percent column none. A p value above .999 shows >.999. A missing value is a blank cell.

Usage

sframe_apa_cells(x, digits = 2)

sframe_apa_col_labels(names, format = c("html", "markdown"), conf_level = 0.95)

Arguments

x

A data frame, such as a result's table.

digits

Decimals for numbers other than p values.

names

Column names.

format

"html" for HTML headings, "markdown" for the pipe tables of Word, OpenDocument and PDF reports.

conf_level

The confidence level a ci_low or ci_high heading states.

Value

A data frame of character columns with the same names.

Details

This is exported because the Quarto report template runs in a separate R session against the installed package.

sframe_apa_col_labels() gives the headings both report engines print for a table's columns: words for a column such as valid_n ("Valid n"), statistic symbols in italics (M, SD, Mdn, SE) and the confidence level in an interval heading ("95% CI lower").

Examples

sframe_apa_cells(data.frame(t = 2.345, p = 0.004, r = 0.53, n = 40L))