6 Workflow: scripts

This book is superseded.

These are solutions to the 1st edition of R for Data Science . A 2nd edition has since been published, with its own solutions to the exercises .

This site is no longer maintained. It is kept online for reference.

Exercise 6.1

Go to the RStudio Tips twitter account, https://twitter.com/rstudiotips and find one tip that looks interesting. Practice using it!

The current timeline of @rstudiotips is displayed below.

Exercise 6.2

What other common mistakes will RStudio diagnostics report? Read https://support.rstudio.com/hc/en-us/articles/205753617-Code-Diagnostics to find out.

You should read that page, but some other diagnostics for R code include the following.

  1. Check for missing, unmatched, partially matched, and too many arguments to functions.
  2. Warn if a variable is not defined.
  3. Warn if a variable is defined but not used.
  4. Check that the code style conforms to the tidyverse style guide.