(Updated: September 04 2024 14:30)

Please install the following:

  1. The current version of R: Even if you have used R previously, you should install the current version from the Comprehensive R Archive Network (CRAN).
    If you are asked to select a CRAN mirror, I suggest that you choose the 0-Cloud mirror which is first in the list.
    • Windows1 only: Download and install the latest version of Rtools.
    • Mac OS2 only:
      • Install the Apple Xcode developer tools. For macOS 10.7 (Lion) or higher, you can install Xcode for free from the App Store. For earlier versions of macOS, Xcode can be installed from your system DVD or downloaded from the Apple developer website.
      • Some R software (e.g., the rgl package for constructing dynamic 3D graphs) uses the the standard Unix X11 windowing system instead of the native Mac windowing system.
        1. Download the disk image (dmg) file for XQuartz (X11 softward for macOS) from the XQuartz website.
        2. When you open this file by double-clicking on it, you’ll find XQuartz.pkg; double-click on it to run the installer, clicking through all the defaults.
        3. Important: After the installer runs, you’ll have to log out and back on to your MacOS account – or simply reboot your Mac.
  2. RStudio: Install the free desktop version of RStudio.
  1. Create a RStudio project for MATH6630:
    • Start RStudio by clicking on the desktop icon.
    • From the RStudio menus, select File > New Project.
    • In the Create Project screen that appears, select New Directory.
    • In the Project Type screen, select New Project.
    • In the Create New Project screen, in the Directory name box, type MATH6630. Then click on the Create Project button at the lower right.
  2. Packages for this course: We will install many additional packages during the course. To get started, install basic packages by typing (or cutting and pasting) the following commands into the Console window in RStudio:
    install.packages(c("car", "devtools", "effects", "ggplot2", "Hmisc"))
    install.packages(c("knitr", "magrittr", "rgl", "rio", "rmarkdown"))
    install.packages(c("latticeExtra"))
    devtools::install_github('gmonette/spida2')
    devtools::install_github('gmonette/p3d')
    install.packages('carData')
    
    
  3. Additional optional software: To create Sweave and knitr LaTeX documents (more sophisticated alternatives to R Markdown) in RStudio, and to compile R Markdown documents directly to PDF files, download and install MiKTeX LaTeX software (for Windows) or the MacTeX LaTeX system (for macOS).
  4. Check that things are working: Open this script and cut and paste it into a new R script in R Studio.
    • Run it manually line by line. Experiment with the code.
    • Run it as a Rmarkdown file by hitting: Ctrl-Shift-K. This should show you the ouput of the script in an HTML window.
  5. Post a message to Piazza: After connecting with Piazza, you can post a message to say whether you were successful. If you ran into problems post a message explaining what seems to have gone wrong and we will all try to help. Use the folder ‘assn1’ for this message.

  1. If you are using Windows and you are not sure whether you have a 64-bit or a 32-bit version you should first visit https://support.microsoft.com/en-us/help/15056/windows-7-32-64-bit-faq to find out.↩︎

  2. I thank John Fox for creating these detailed instructions for macOS.↩︎