R is supported by the great majority of operating systems:
r-base
and r-base-dev
for those using Ubuntu or derivatives.While R designate the programing language itself, it is often useful to have an integrated piece of software to write and execute your R scripts. A particularly nice one is RStudio.
There are other alternatives, but let’s face it. RStudio rocks.
Find the binaries for your platform on the RStudio website.
R packages are essentially extensions that gives “vanilla” R new capabilities.
There are 2 ways to install packages in RStudio, but it is actually easier to do it through the “Console” interface in RStudio. In the following figure, it’s the left hand panel:
The RStudio interface
You can install the packages needed for this course by using the install.packages
function in that console. Simply copy and paste the following lines, and hit the Enter
key:
install.packages(
c(
"sf",
"rgdal",
"sp",
"gstat",
"raster",
"mapview",
"aqp",
"GSIF",
"igraph",
"devtools",
"caret",
"randomForest",
"gbm",
"Cubist",
"plyr",
"reshape2",
"tidyverse",
"ggplot2",
"ggthemes",
"hrbrthemes",
"plotly",
"knitr"
)
)
Follow the instructions in this video if you need help.
There is one additional package that will need to be installed separatedly:
devtools::install_bitbucket("brendo1001/ithir/pkg")
You should find yourselves with the following:
This is what success looks like!
During the course, we will have a quick look at the RStudio interface, and learn the basics for data analysis in R. That said, if you are a first timer, we can recommend reading the following material prior to the course: