R Club Tutorials

This is a collection of R tutorials I have written for the R club that I run at Bangor, I’ve put some links to useful resources and packages below and in the sidebar there are links to the various tutorials. Hope you find this useful!

Useful resources

I’ll start compiling useful resources I’ve come across here for easy access, if you can think of anything you think I should add let me know.

  • For those who are new to R, or returning after a long absence, the swirl R package is really useful as it teaches you R interactively from the console.

  • Cheatsheets hosted by RStudio offer a handy quick reference to various packages and techniques - really useful for when you can’t quite remember the name of the function you used before. Cheatsheets on non-RStudio packages are at the bottom of the page.

  • Tutorials from Our Coding Club cover a wide variety of topics, I’ve used them before within R club and also just to teach myself new things.

  • For those who are new to R Markdown the RStudio team have released a set of lessons on how to use it which are a good introduction and give an idea of its capabilities (which are much greater than I realised, might have to try and do a few of these soon).

  • This website was created using the blogdown package so I have to mention the associated online book that guided me through this rather interesting journey.

Featured packages

I like to feature an R package in the R club emails that I’ve found to be useful or otherwise interesting. I’ll list the ones mentioned so far here for reference, and update when I remember to:

  • janitor offers some great functions for examining and cleaning dirty data.
  • colourpicker is an interactive colour picker that comes with a Plot Colour Helper tool as an RStudio Addin which allows you to interactively pick colours to use in your plots.
  • styler provides tools for formatting your code so it becomes easier to read (also with RStudio Addin).
  • summarytools has some really useful functions for quickly and neatly summarising data - see my tutorials on the sidebar for examples.
  • roperators has some interesting functions to “make syntax a bit nicer” - worth a look at the introduction vignette as I can’t summarise it all here!
  • extrafont is the classic package for using more fonts in your plots. I feel like my life is so much more complete now I can title my plots using the Star Trek title font.
  • car offers so many functions related to regression, see the tutorials in the sidebar for examples.
  • broom takes the messy output of functions such as lm or t.test and turns them into tidy data frames.
  • viridis offers a selection of colourblind friendly palettes.
  • paletteer offers every colour palette in any package in R (or at least tries to). There’s an associated github repo with pictures of them all and useful colour-related information.