Helpers for Data Analysis and Presentation Focused on Undergrad Psychology

Contains functions for the easy display of statistical tests as well as some convenience functions for data cleanup. It is meant to ease existing workflows with packages like 'sjPlot', 'dplyr', and 'ggplot2'. The primary components are the functions prefixed with 'tadaa_', which are built to work in an interactive environment, but also print tidy markdown tables powered by 'pixiedust' for the creation of 'RMarkdown' reports.

Build Status CRAN_Status_Badge CRAN_Downloads_Badge CRAN_Downloads_Badge

This is tadaatoolbox version 0.15.9000 (semver(ish)).
It contains helpers for data analysis and presentation focused on undergrad psychology, the target audience being students at University of Bremen.

Please consider this as a teaching project and be careful if you intend to use it for production use.
To see what's new, see Also, since this project is still in the 0.x.y version, you should expect the API to change at any time. Once we reach 1.0.0, API changes will be rolled out more slowly and include depracation warnings. In the meantime, the package is available on CRAN primarily for convenience, because its target audience is likely not familiar with GitHub or devtools.


Install the current development version from GitHub (recommended):

if (!("devtools" %in% installed.packages())){


Or install the most recent stable version from CRAN:



Please do! I have no idea where I'm going with this. Feel free to open issues.


Contributer Role
Lukas Burk Author & Creator
Tobias Anton Author
Daniel Lüdecke Contributor


See the included vignette for a demonstration: browseVignettes("tadaatoolbox") or view the pkgdowned version of this repo.

Tidy test output

  • tadaa_aov: For aov with included partial η2 and Cohen's f.
  • tadaa_kruskal: A wrapper for kruskal.test tidied and optionally pixiedusted.
  • tadaa_t.test: For t.test with automatic homogenity of variance detection, effect size and power.
  • tadaa_wilcoxon: A wrapper for wilcox.test tidied and optionally pixiedusted.
  • tadaa_levene: Wrapper for car::leveneTest tidied and optionally pixiedusted.
  • tadaa_normtest lets you do tests for normality (4 methods) over multiple variables.
  • tadaa_pairwise_t, tadaa_pairwise_gh and tadaa_pairwise_tukey for various pairwise procedures.

Statistical functions

  • modus: A simple function to extract the mode of a frequency table

  • nom_chisqu: Simple wrapper for chisq.test that produces a single value.

  • nom_phi: Simple wrapper for vcd::assocstats to extract phi.

  • nom_v: Simple wrapper for vcd::assocstats to extract Cramer's V.

  • nom_c: Simple wrapper for vcd::assocstats to extract the contingency coefficient c.

  • nom_lambda: Simple wrapper for ryouready::nom.lambda to extract appropriate lambda.

  • ord_gamma: Simple wrapper for ryouready::ord.gamma.

  • ord_somers_d: Simple wrapper for ryouready::ord.somers.d.

  • tadaa_nom: All the nominal stats in one table.

  • tadaa_ord: All the ordinal stats in one table.

Misc. helpers

  • generate_recodes: To produce recode assignments for car::recode for evenly sequenced clusters.
  • interval_labels: To produce labels for clusters created by cut.
  • delete_na: Customizable way to drop NA observations from a dataset.
  • pval_string: Shamelessly adapted from pixiedust::pvalString, this will format a p-value as a character string in common p < 0.001 notation and so on. The difference from the pixiedust version is that this function will also print p < 0.05.

Helpers for plots

CI calculators

  • mean_ci_t: Returns a data.frame with y (mean), ymin and ymax for the CI bounds.
    • confint_t: For the underlying function to get the CI width. Returns a single value.
    • confint_norm: Similar, but baes on normal distribution. Returns a single value.
  • mean_ci_sem: Standard error and CI, you guessed it, in one table.

Plotting templates

  • tadaa_int: Simple interaction plot template.
  • tadaa_balance: Check equality of group sizes.
  • tadaa_mean_ci: Plots means with 95% confidence intervals as errorbars.
  • tadaa_plot_tukey: For pretty TukeyHSD visualization.


I rely on these awesome package for all the things this package does, so you might want to consider checking them out.

  • stats, methods, broom, magrittr, pwr, pixiedust, car, ggplot2, nortest, lsr
  • viridis, DescTools

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


tadaatoolbox 0.16.0

Fixes & Features

  • Add ord_pairs to retrieve $N_c$, $N_d$, ties and total number of pairs for contingency tables. Internals for this function are straight up copied from this gist.
  • Add etasq in case you want to show students what $\eta^2$ is without having to explain ANOVA.
  • Fix ord_somers_d not returning the correct value for symmetric = TRUE
  • Removed drop_labels because sjlabelled::zap_labels is a thing


  • Eliminate ryouready dependency, in favor of the more versatile DescTools package:
    • nom_lambda: Use DescTools::Lambda
    • ord_gamma: Use DescTools::GoodmanKruskalGamma
    • ord_somers_d: Use DescTools::SomersDelta
  • Eliminate vcd dependency, also in favor of DescTools.
  • (The DescTools functions are very similar to what the wrappers do, so the wrappers might be removed in the future.)
  • Eliminate lazyeval dependency in tadaa_int by being better at ggplot2.
  • Eliminate dplyr dependency by being better at R.
  • Eliminate haven dependency by not re-exporting as_factor anymore ¯\_(ツ)_/¯
  • Eliminate sjmisc depencency because why did we depend on that again?
  • Eliminate sjlabelled dependency (only used for re-exports).
  • Eliminate lsr dependency in favor of, you guessed it, DescTools for eta in tadaa_aov.

tadaatoolbox 0.15.0

  • Fix error in SEM calculation in tadaa_one_sample for t-tests
  • Make sure tadaa_-test functions use tadaatoolbox::pval_string instead of the pixiedust version
  • Remove recoded leist var from ngo, as it should be computed from leistung by students.
  • Move cowplot from Imports to Suggests because whe only need it in one function, sometimes.
  • More compact table output in tadaa_nom and tadaa_ord.


  • [tadaa_]likertize is removed. Use sjmisc::split_var.
  • labels_to_factor is removed because various as_factors exist.

tadaatoolbox 0.14.0

  • Silence warnings in functions using chisq.test
  • Add ord_tau to calculate all the Taus
    • Append them on tadaa_ord

tadaatoolbox 0.13.0

New Features

  • Add tadaa_chisq for a $\chi^2$-Test with OR and effect size.

Under the Hood

  • Switched from sjmisc to the new sjlabelled (Thanks, @strengejacke!)
  • Also re-export magrittr::%$% because it's really handy sometimes.
  • Fix #30: Undocumented arguments in tadaa_one_sample

tadaatoolbox 0.12.0

New Features

  • Add tadaa_pairwise_t as an extension of stats::pairwise.t.test that works with two grouping factors and thereby can test interactions.
    • Also knows the Sidak method for p-adjustment, both regular and step-down procedures.
    • See this and that
  • Add tadaa_pairwise_gh for the Games Howell post-hoc procedure as an alternative to TukeyHSD.
  • Add tadaa_pairwise_tukey while we're at it. Just a thin wrapper for stats::TukeyHSD but with tidied output and usage consistent with the previous tadaa_pairwise_* functions.
  • Add tadaa_plot_tukey to plot Tukey HSD results as error bars because boy do I like error bars.
  • Add tadaa_balance as a replacement for tadaa_heatmap to check equality of group sizes.
  • Re-exports:
    • %>% from magrittr as all the cool kids to these days.
    • %<>% from magrittr because I happen to really like it.
    • [sg]et_label[s]and word_wrap from sjmisc, as they're handy.
    • as_factor from haven as a replacement for the deprecated labels_to_factor.

Tweaks, Patches & Bug Fixes

  • theme_tadaa:
    • Is now an alias for theme_readthedown, will probably become the new canonical version.
    • Now finally adds vertical space to the x axis title via proper margining.
  • tadaa_aov:
    • Default type is now 3, for generally safer results and consistency with SPSS.
    • Added check_contrasts option for type = 3 sums of squares, which ensures each non-ordered factor has contr.sum contrasts
    • Now auto-factorizes independent variables by default, fixes #24.
    • Now imports methods, which should fix an issue during knitr or rmarkdown processing where the function is couldn't be found. If not, manually library(methods) as a workaround.
    • Fix wrong sprinkle labelling causing eta.sq to be formatted like a p-value.
    • Added show_power argument to calculate power via pwr::pwr.f2.test.
      • Requires more testing against software like G*power to ensure accuracy.
  • tadaa_t.test:
    • Internal Levene test now uses center = "median" for more robust results, as it should.
      • Now also uses $\alpha = 0.05$ instead of $\alpha = 0.1$.
      • Use new argument var.equal to override internal Levene test.
    • Power should now be properly reported for alternative = "less" or greater.
    • Added conf.level argument used for CI and power calculations
    • effect_size_t:
      • Now doesn't return the absolute effect size by default.
      • Added paired argument so effects for paired tests are now a thing.
  • tadaa_wilcoxon:
    • Also fix direction argument not being honored.
  • tadaa_int:
    • Gains print (logical) argument to suppress printing if so desired. The output will still be returned invisibly.
  • tadaa_one_sample: Should make sense now.
  • Remove na.rm argument from tadaa_t.test and tadaa_wilcoxon because it's problematic, and in case of paired = TRUE it would have produced flat out wrong results.
  • Documentation improvements
  • Improved print = markdown output of tadaa_aov, tadaa_t.test, tadaa_wilcoxon, tadaa_one_sample, tadaa_kruskal. Unfortunately print = "console" now has headers with unparsed $\LaTeX$-expressions, but who uses that anyway.


  • labels_to_factor: Was a wrapper around haven::as_factor and is obsolete by now, as as_factor can do the same thing this function was built for.
  • tadaa_likertize is renamed to likertize, deprecated since sjmisc::split_var is probably better anyway.

tadaatoolbox 0.11.0

New Features

  • tadaa_aov now knows about types, uses type 1 by default and can do types 2 and 3.
    • Method for effect size calculation now uses lsr::etaSquared, which also takes a type argument.
  • Add tadaa_mean_ci: Plots means with 95% confidence intervals as errorbars (thanks Christoph for the suggestion).
  • Add tadaa_one_sample: For one-sample t-tests and finally an easy z-test.
    • Add confint_norm: Helper to get CIs, similar to confint_t
  • Add tadaa_wilcoxon: For when tadaa_t.test isn't non-parametric enough. Same usage.
    • Additionally displays medians of each group.
  • Add tadaa_kruskal: For when tadaa_aov isn't non-parametric enough, too.
  • Move tadaa_semmean_ci_sem because it's more confint than tadaa.
  • Add show_n option to tadaa_int: Optionally display N in subtitle.

Tweaks, Patches & Bug Fixes

  • Fix documentation inconsistencies.
  • Turns out pval_string(0.05) returned < 0.05. Well. That was embarrassing.
  • Minor tweaks to theme_readthedown regarding text placement.


  • Remove superfluous variables from ngo: index, zeng, zdeutsch, zmathe.

tadaatoolbox 0.10.0

Minor changes

  • New function: tadaa_normtest lets you do tests for normality (4 methods) over multiple variables.
  • New function: tadaa_heatmap generates a heatmap. Mhhh, heatmaps.
  • New function: tadaa_sem shows the standard error of the mean and it's confidence interval
  • New function: pval_string as a modification of pixiedust::pvalString that includes p < .05.
  • Added a ggplot2 theme for the rmdformats::readthedown Rmd template.
  • tadaa_aov, tadaa_t.test and the new tadaa_normtest now return a data.frame by default, allowing further shenanigans

Patch changes

  • New options in tadaa_int:
    • Set grid = TRUE for the two interaction plots to be printen in a grid via cowplot::plot_grid.
    • Choose the plot labels via the labels argument.
  • tadaa_int plot output now also is a little tidier and optimized for smaller widths.
  • tadaa_aov now also shows Cohen's f for easier power calculations based on f (pwr, G*power)
  • Add option reduce to modus, so multiple results will be concatenated to a character by default.
  • Add additional option as_character to modus because guessing about return value classes is no joke.
  • Fix issues with generate_recodes and interval_labels (#1).

tadaatoolbox 0.9.0

Minor changes

  • Add tadaa_ord as ordinal equivalent of tadaa_nom.
  • Make table output of both of the former functions smaller in width by abbreviating column names
  • Add brewer_palette option to tadaa_int
  • Dependencies declared in DESCRIPTION are still experimental because of uncertainty regarding failing travis builds. I don't know what's going on there.

Patch changes

  • Add family tag to tadaa_ functions so their documentation is linked
  • Fix return values of tadaa_aov, _t.test and _nom which did not work as I expected

tadaatoolbox 0.8.1

  • Fix typo in DESCRIPTION, misspelling pixiedust. Sorry!
  • Bump dependencies
    • pixiedust depends on R (>= 3.2.1), so we might as well depend on that version, too
    • Specifiy minimal versions for pixiedust, sjmisc, and broom, just to be safe
  • Add vignette
    • Overhauling README to be less redundant compared to the usage vignette

tadaatoolbox 0.8.0

  • Added a file to track changes to the package.
  • Working on CRAN compatibility
  • Submitted to CRAN
  • It's on CRAN, yay!

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.16.0 by Lukas Burk, 2 months ago

Report a bug at

Browse source code at

Authors: Lukas Burk [aut, cre], Tobias Anton [aut], Daniel Lüdecke [ctb]

Documentation:   PDF Manual  

MIT + file LICENSE license

Imports stats, methods, broom, magrittr, pwr, pixiedust, car, ggplot2, nortest, viridis, DescTools

Suggests testthat, knitr, rmarkdown, cowplot

See at CRAN