For the lab assignment, you will use the SimpleRGraphs tutorial to walk through introductory graphics in R. When you are finished, you should feel confident making graphs in R.
This tutorial was built in and works within Rstudio but it also works in web browsers. The packages developed for this tutorial are hosted on Github, so you will need to make sure that your Rstudio and Github are linked for a smooth installation. If you do not have Github and Rstudio configured to work together, please visit this gist to get setup!
Mac Users will need Xcode developer tools
from the App store in order to use devtools
Windows Users will need Rtools from
CRAN in order to use devtools
If you do not have learnr
&
devtools
installed already, use the commented(#) lines in
the code chunks below before running
library()
First: You will need learnr
to run this
tutorial (or create your own - learnr
documentation):
# Run the install line ONCE
install.packages("learnr")
library(learnr)
Second: Install the development version of the tutorial from GitHub with devtools:
# Run the install line ONCE
install.packages("devtools")
library(devtools)
::install_github("adc0032/SimpleRGraphs") devtools
Third: This tutorial package has an accompanying data package that can be accessed from GitHub with:
::install_github("adc0032/WILD7150") devtools
The package also requires tidyverse
, but you should be
prompted to install if you do not have it installed already.
To start the tutorial in a web browser (pref. Google Chrome), run the following command in your console:
::run_tutorial("simplergraphs", package = "SimpleRGraphs") learnr
Additionally, you should now have a “Tutorial” tab, where you can access “Simple Graphs in R” by clicking Start Tutorial This will start the tutorial in an Rstudio window