R is the programming language that we will be using. R Studio is the program we will use R through. You must install both. This page provides instructions on how to set up R and R Studio.
If you are using a tablet, Chromebook or otherwise do not have a computer that you can install programs on, you will need to use head over to RStudio Cloud (http://rstudio.cloud.com), make an account and start a new project.
Once you are done, come back to this page and pick up at “Navigating R Studio”
A free RStudio Cloud account gives you ~25 hours/monthly, which may not be enough for this class. The next level upgrade gives you 75 hours/month for $5/month which should be plenty of hours. If this is not a viable solution for you there are physical campus computers that you can use, the wildcat virtual lab, and loaner laptops for in class use only.
While the cloud is easier to initially setup, I want you to only use it if you absolutely have to. Having your own installation on your computer ensures that
Retain sanity while troubleshooting
This will ensure that when you restart R you do not “carry forward” objects such as data sets that you were working on in a prior assignment.
To effectively restart R, go to the file menu and click Session , then “Restart R”, or “Restart R and clear output”.
This is a math class, and so you will be needing to write math. But on a computer. To write math notation in your homework, you need a typesetting program called \(\LaTeX\) (pronounced “lay-tek” or “lah-tex”). It’s a super neat program, but also nearly 4Gb. Too big for our needs. That’s where the tinytex
package came from. we’re going to use it to install a lightweight version of \(\LaTeX\). This will let us write math equations in R Markdown, and create PDF’s of your homework. Both of which are necessary for this class.
This is a two step process:
install.packages("tinytex")
When the download and install is complete, you should see a message similar to:
in
The downloaded binary packages are :\Users\Robin\AppData\Local\Temp\Rtmpi8NAym\downloaded_packages C
::install_tinytex() tinytex
R is an open source program with thousands of people contributing by writing packages that contain functions that let us do nifty stuff. Just like above with tinytex
, you can add those packages to your R installation by typing
install.packages("package name")
where the package names for the packages you need are are listed below. Install them in the order listed to avoid duplication of installation. It’s not a huge deal, just unnecessary.
openintro
devtools
learnr
Lastly, install the ChicoLearnR
directly from github by typing the following:
::install_github("norcalbiostat/ChicoLearnR") devtools
1
to choose all packages listed.When done, restart R studio.
In the top right panel, click the Tutorial tab. If you don’t see Section 1 Introduction to R from the ChicoLearnR package then something didn’t work during the installation. Try to install the ChicoLearnR
package again and seek assistance from your peers, the instructor, or Community Coding.
Setup your folder for success!
Using a consistent folder structure across your projects will help keep things organized, and will also make it easy to find/file things in the future. This can be especially helpful when you have multiple projects.
You also need to choose a naming convention for your class folder and stick with it. Recommended options are:
MATH350
)math350
)math_350
)Math350
)✏️ On your computer, in an easy to find place, create a new folder named math350
using whatever naming convention you choose. 🎦 Windows video walk through.
When you download a file, right click and “Save as” or “Save target as” and actively choose where to download this file.
❌ Do not let files live in your downloads folder.
❌ Do not open any files from your browser window after downloading.
🔽 Right click [this link] to download and save Assignment 1 into your homework
folder now.
- Then rename the file to replace template
with your username. - E.g. mine would look like hw_01_rdonatello.Rmd