R package

The textbook comes with a companion R package called Rling, which contains the data sets and a few functions. You will need it in order to reproduce the R code in the textbook. To install the package, save the file Rling_1.0.tar.gz to any directory in your computer without decompressing the file. Take note of the location. Next, type in the following code in R:

install.packages("Your/Path/Rling_1.0.tar.gz", repos = NULL, type = "source")

Do not forget to replace "Your/Path/..." with the actual path, e.g. "C:/Users/JohnSmith/..." Do not use single backslashes when specifying the path. Use forward slashes or double backslashes instead.

Alternatively, it may be easier to select the file interactively by using the following code:

install.packages(pkgs = file.choose(), repos = NULL, type = "source")

This will open your file manager application, where you can browse your directories and find the archive file interactively.