Instructor: Jing Gong

( Association Rules) Fix for Issue Related to Installing the Packages

If you get errors installing packages when running the aRules.r script, try the following:

1. Change lines 29~33 into the following. The original script uses CMU site (http://lib.stat.cmu.edu/R/CRAN) as the repository to download the packages. But the CMU site seems to be broken today. The new lines use default R package repository, which seems to work today.

if (!require(“arules”)) { install.packages(“arules”)
require(“arules”) };

if (!require(“arulesViz”)) { install.packages(“arulesViz”)
require(“arulesViz”) };

2. If step 1 does not work, try to set the repository to a different one by following the instructions below:

1) In RStudio, go to Tools/Global Options…

2) Click on Packages (on the left).

3) Click on Change… under CRAN Mirror.

4) Choose one of the USA sites at the end (e.g., try the one in Dallas, TX).

5) Rerun the script. It should work. If not, try a different USA site.

If it doesn’t, let me know!

-Jing

Leave a Reply

Your email address will not be published. Required fields are marked *