Changelog
Source:NEWS.md
apaTables 4.0.0
This release follows 2.0.8, the previous version on CRAN, so everything below describes what changed for someone upgrading from that version. Versions 3.0.0 and 3.0.1 existed on GitHub only and were never released.
apaquarto / Quarto support
- apaTables now ships its own patched copy of the apaquarto Quarto extension and can install it for you, rather than asking you to run Quarto’s own extension commands.
apa.quarto.new(path)creates a folder containing a Quarto document with a working APA header and a worked table, with the extension already installed beside it, so the very first render produces a real APA manuscript.apa.quarto.setup()installs or repairs the extension in a project you already have, and is silent when the project’s copy is already correct. Runningquarto add wjschne/apaquartoorquarto update extension wjschne/apaquartoin one of these projects silently reverts the extension to the stock, unpatched copy – while reporting[No Change]– undoing the fixes; runningapa.quarto.setup()again puts the tested copy back. - Tables drop directly into apaquarto documents. Build the table on one line and pass it to the entry point named for the document’s own destination on the next:
apa.quarto.pdf(),apa.quarto.docx(),apa.quarto.html()orapa.quarto.revealjs(). The same analysis produces a PDF, a Word file, a web page or a slide – you change the document’sformat:line and the matching call, not your code. - The table’s number, title and note are supplied automatically. Nothing has to be typed for them, and they are re-derived on every render, so they stay correct when the analysis changes. To use your own wording instead, add a
tbl-caporapa-notechunk option, or passtitle =/note =to the entry point; whichever is supplied wins over the generated version, and the chunk option wins over the argument.apa_caption()andapa_note_text()return apaTables’ own wording for an author who would rather start from it. -
apa.quarto.template(), run in the R console, prints a ready-to-paste block of code for a table you have already built. It derives the chunk label from the name you typed –apa.quarto.template(table3)labels the chunktbl-table3– so two templates pasted into one document do not collide. - Wide and tall tables are handled without anything being added to the document. apaTables measures each table as the document renders and asks apaquarto for a rotated (landscape) page when it will not stand upright, at full size, under either table placement. A table taller than the page continues onto the next one with its column headings repeated. Every table function takes a
landscapeargument for the cases where you want to overrule the measurement:TRUEforces a rotated page,FALSEforbids one, and the default measures. The chunk option#| apa-landscape:overrides that argument and can also forbid one. -
font.sizemeans the same thing on all four Quarto destinations: your size exactly, applied to the table body. Where a destination cannot deliver the size asked for, it says so in the rendered draft rather than silently ignoring it. Word’s range is 6 to 12 pt. - In Word output, the automatic fit now counts the fixed padding every Word table cell carries (which does not shrink with the type, so it weighs most on dense tables at small sizes). A many-column table that used to be shrunk until it just fit — and then wrapped its widest column’s labels — now takes the next size down and keeps every label on one line.
- The page a table is fitted to is read from the document’s own settings rather than assumed: US letter and A4 paper and a
geometry: margin=setting are recognised. When the YAML carries something apaTables cannot measure, the standard manuscript page is used and the knitted draft says so. - New
apa.quarto.example()writes two ready-to-edit example documents that demonstrate every table type, one table per page – one document per common destination:<name>-pdf.qmdrenders to a PDF manuscript and<name>-docx.qmdto a Word manuscript. Both use the apaquarto extension, which the function installs alongside them. It returns their paths invisibly as the named character vectorc(pdf = , docx = ). (Using apaTables tables in an ordinary Quarto document without apaquarto is still supported and is covered in the vignette.) - Quarto slide support is reveal.js only.
apa.quarto.revealjs()fits the table to the slide. PowerPoint is not yet supported: apptxrender still produces the table and warns you, so a deck is never handed out without your knowing. - Journal mode (
documentmode: jou) is not supported for apaTables tables. A two-column page cannot break a table across pages, so rows, columns and whole notes can be missing with nothing reported. apaTables warns during the render; usedocumentmode: man, or save the table withapa.save().
File output
- Table numbers are now real by default.
table.numberdefaults to1, so a table built without one is Table 1; version 2.0.8 defaulted toNAand printed the literal line “Table NA”. Settingtable.number = 0– orNA, orNULL– now means the table carries no number at all: none is shown at the console or written to the Word file. Whenapa.save()writes several tables to one file, a table left at the default is numbered by its position in that file (Table 1, Table 2, Table 3), while a number you supplied is kept. In an apaquarto document the value is ignored, because apaquarto numbers the tables itself. -
apa.save()now writes Microsoft Word.docxand.htmlfiles (chosen by file extension) via flextable/officer. The hand-rolled RTF engine has been retired; a.doc/.rtffilename is written as.docx.apa.save()does not write PDF; for a PDF table, useapa.quarto.pdf()inside an apaquarto / Quarto document, which is what the error message says if you try. -
Every table function now takes a
landscapeargument, and it is a three-way setting rather than an on/off switch:TRUEforces a rotated page,FALSEforbids one, and the default –NA– measures the table and decides. This changes existing behaviour: in 2.0.8apa.cor.table(),apa.d.table()andapa.reg.table()defaulted tolandscape = TRUE, so those tables were rotated whether or not they needed it. Nothing rotates now unless it does not fit. Passlandscape = TRUEfor the old orientation. -
apa.afex.table()is new: an APA ANOVA table fromafex::aov_ez()output, covering the repeated-measures and mixed designsapa.ezANOVA.table()used to serve. Itstable.titleargument is honoured in every destination, and “ANOVA Results” is the title when none is given. -
.htmloutput fromapa.save()carries the same APA elements as the Word file: the table’s caption holds the “Table N” line and the italic title, and the note sits below the table, with its italics and super/subscripts intact. Table numbers are assigned exactly as for.docx, so the same tables saved to both formats carry the same numbers. - Tables are left-aligned so each shares the same left margin as its number, title, and note. Correlation and d-value tables add a blank line of separation between variable rows for readability.
- Word output follows APA 7 table setup: the table number is bold, the title sits one double-spaced line below it, and a blank line separates the table from its note. The note preserves italics and super/subscripts (e.g., M, SD, eta-squared symbols), and the significance-star sentence (“* indicates p < .05. ** indicates p < .01.”) starts on its own line. Regression Fit cells render R-squared and change-in-R-squared with proper italics, superscripts, and the Delta symbol. Table pages use 0.5 in side margins, and a table wider than the text area is scaled to fit it rather than clipped by Word.
- Notes keep their styling in every destination – italic M, subscripts and superscripts, and a multi-part note that starts each part, such as the significance-star sentence, on its own line.
Deprecations and dependencies
-
Breaking:
apa.ezANOVA.table()has been removed. Theezpackage it depended on was archived on CRAN; useapa.afex.table()withafex::aov_ez()output for repeated-measures and mixed designs instead.ezis no longer listed in Suggests. -
Breaking:
apa.reg.boot.table()has been removed. Bootstrapped regression tables are not part of this release; useapa.reg.table()for the standard regression table. - Dependencies have changed.
boot,tibbleandMBESSare no longer imported –bootandtibbleare unused, andMBESSis now suggested rather than required, so it is needed only for the confidence intervals inapa.d.table().flextableandofficerare new imports, used byapa.save()to write the Word and HTML files.
Bug fixes
-
apa.aov.table()labelled the confidence-interval column with theconf.levelyou supplied even when that value was out of range. Only.90and.95are supported and anything else is treated as.90, soapa.aov.table(fit, conf.level = .85)computed a 90% interval and headed the column “85% CI”. The header, the console column name, and the interval now always agree. - Building a d-value table no longer disables warnings for the rest of the session.
MBESS::ci.smd()setsoptions(warn = -1)and does not restore it, so after oneapa.d.table()call every later warning – from any package – was discarded; inside a Quarto render that included apaTables’ own too-wide-table warning. apaTables now saves and restores the option around its MBESS calls.