R Intro PDF - An Intro to Using R
In order to work with the models, you will need to download two programs, R and R-Studio. You must download them in that order, or R-Studio won’t work properly.
R users can access their download from servers close to them in order to cut down on download speed. These remote copies are called “mirrors.” To download R from a server near you, follow the instructions below.
1. Follow this link: https://cran.r-project.org/mirrors.html
• The countries are listed alphabetically, or you can do Ctrl + F and search for your home state.
2. No matter which link you choose, you will see this screen:
3. Choose the link for your computer’s operating system. If you aren’t sure which operating system you are using, ask your IT department for more information.
• Windows Users – Choose the link: Install R for the first time (see below)
• On the following screen – Choose the large link at the top: Download R 3.4.1 for Windows (62 megabytes, 32/64 bit)
• For Mac Users – Unlike Windows, there are multiple versions of R available for Mac depending on your specific version you are using, but it must be compatible with the “OS X” series.
o For versions OS 8.6-9.2 and OS X 10.1, click on the link circled in red below.
o For other versions, scroll down. If you aren’t sure your specific OS, ask your IT department.
4. Install R as you would any other .exe program. You may need to go into your downloads folder, or the installation wizard will start on its own. Follow the instructions in the wizard and customize your download to make R easy to find on your computer.
To Open R
In a PC, using all default settings:
1. Select “This PC” folder
2. Select “Program Files” folder
3. Select “R” folder
4. Select “R-3.4.1” folder
5. Select “bin” folder
6. Select the R logo to open the application
In a Mac, using default settings:
1. Select “Applications” folder
2. Select “R” folder
3. Select the “R” logo (see above)
When it opens, R looks like this by default:
Installing Packages in R:
For the meeting, you will need to install a few extras into the default software package.
To install these packages, just type the following command into the R console (where the cursor is flashing, see above):
install.packages (c("shiny","knitr","Matrix","deSolve","epiModel","ggplot2"))
The correct packages should download automatically. If you have any problems with your download, there will be people on hand at the meeting to assist you.