(Updated: September 04 2024 14:30)
Please install the following:
- 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.
- Windows only: Download and install the
latest version of Rtools.
- Mac OS 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.
- Download the disk image (dmg) file for XQuartz (X11 softward for
macOS) from the XQuartz website.
- 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.
- Important: After the installer runs, you’ll have to log out and back
on to your MacOS account – or simply reboot your Mac.
- RStudio: Install the free desktop version of RStudio.
- Scroll towards the bottom of the page and right-click on the
appropriate installer for your operating system. Download it and then
run the downloaded file. When you first run RStudio, it will use the
last version of R that you installed.
- 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.
- 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')
- 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).
- 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.
- 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.