Tips & Tricks

Use the %>% operator to add multiple statistical tests to a list

tidystats is designed with the tidyverse in mind. One of the things I like about the tidyverse is that functions often accept a data frame as the first argument, allowing you to pipe data frames between functions.

I designed the add_stats() function such that you can use the %>% operator to add multiple tests to a list, like so:

results <- results %>%
  add_stats(sleep_test, type = "primary") %>%
  add_stats(lm_D9, preregistered = FALSE) %>%
  add_stats(npk_aov, notes = "An ANOVA example")

Alternatively, you can also do it without the operator:

results <- add_stats(results, sleep_test, type = "primary")
results <- add_stats(results, lm_D9, preregistered = FALSE)
results <- add_stats(results, npk_aov, notes = "An ANOVA example")

In the latter case, you have to repeat the assignment and the first argument each time you call add_stats(). You do not need to do this when you use the %>% operator, saving you some time and making your code easier to read.

Use Google Chrome for Word Online

Both Safari and Firefox add unnecessary scrollbars to the content of taskpane-based add-ins, such as tidystats. These scrollbars unnecessarily cover content, making it a bit more annoying to use these types of add-ins in these browsers.