4 Installation Links
Please install R and RStudio by following the links below. I highly recommend that you also install Git (link below) and create an account on GitHub (link below). The Git related tools are very useful but some workplaces will not allow the use of these tools for security reasons. Therefore, I will briefly cover Git but you are not required to use these tools during the workshop.
Software | Link |
---|---|
R | https://cran.r-project.org/bin/windows/base/ |
RStudio | https://www.rstudio.com/products/rstudio/download/#download |
Git | https://git-scm.com/downloads |
GitHub | https://github.com |
4.1 Updating Software and Packages
4.1.1 R
Run the following code in the RGui, NOT in RStudio. The RGui should be installed when you install R. On my Windows machine, I access R by clicking on the R program file, “R x64 3.5.1”.
You should get a window like this if you have opened the correct program.
This code was copied from: https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/). Make sure R Studio is closed before running this code within the RGui.
# installing/loading the package:
if(!require(installr)) {
install.packages("installr");
require(installr)
} #load / install+load installr
# using the package:
updateR()
4.1.2 RStudio
- Open RStudio
- Click on “Help” on the toolbar
- Click on “Check for Updates”
- Follow instructions
4.1.3 R-Packages
- Open RStudio
- Click on “Tools” on the toolbar
- Click on “Check for Package Updates…”
- Follow instructions
4.1.3.1 Packages for Workshop
Please run the following code within RStudio to make sure you have all of necessary packages for this workshop installed.
- Open RStudio
- Copy the following code
package.vec <- c("tidyverse", "lubridate",
"knitr", "rmarkdown", "markdown", "caTools", "bitops",
"DT", "leaflet", "shiny", "jsonlite",
"data.table", "rprojroot", "viridis")
install.packages(package.vec)
- Paste the code into the Console within RStudio
- Hit Enter
- If prompted with “Do you want to restart R prior to installing?”, select “Yes”
- If prompted again then select “No”
- The packages should begin to install. This may take some time.