Publications by sindri

Create and Format a Google Sheet Within R: Exercises

10.05.2018

In this exercise set, we will practice using the Google Sheets package to create and manipulate a Google spreadsheet within R. After completing this exercise set, you will be able to prepare a basic Google Sheets document using just R, leaving behind a reproducible R-script. Note that using Google Sheets is free of cost, but requires you have acc...

2569 sym 2 img

Programmatically creating text output in R – Exercises

25.05.2018

In the age of Rmarkdown and Shiny, or when making any custom output from your data you want your output to look consistent and neat. Also, when writing your output you often want it to obtain a specific (decorative) format defined by the html or LaTeX engine. These exercises are an opportunity to refresh our memory on functions such as paste, spr...

3489 sym R (51 sym/1 pcs) 2 img

Sharpening The Knives in The data.table Toolbox: Exercises

08.06.2018

If knowledge is power, then knowledge of data.table is something of a super power, at least in the realm of data manipulation in R. In this exercise set, we will use some of the more obscure functions from the data.table package. The solutions will use set(), inrange(), chmatch(), uniqueN(), tstrsplit(), rowid(), shift(), copy(), address(), setna...

3541 sym R (364 sym/2 pcs) 2 img

Melt and cast the shape of your data.frame – Exercises

22.06.2018

Datasets often arrive to us in a form that is different from what we need for our modelling or visualisations functions who in turn don’t necessary require the same format. Reshaping data.frames is a step that all analysts need but many struggle with. Practicing this meta-skill will in the long-run result in more time to focus on the actual ana...

2449 sym R (3027 sym/15 pcs) 2 img

Fighting Factors with Cats: Exercises

20.07.2018

In this exercise set, we will practice using the forcats factor manipulation package by Hadley Wickham. In the last exercise set, we saw that it is entirely possible to deal with factors in base R,  but also that things can get a bit involved and un-intuitive. Forcats simplifies many common factor manipulation tasks and worth mastering if you ca...

2962 sym 2 img