-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path00_workshop_prep.Rmd
112 lines (84 loc) · 3.13 KB
/
00_workshop_prep.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
title: "R Markdown Crash Course"
author: "Zachary M. Smith"
date: "`r Sys.Date()`"
site: "bookdown::bookdown_site"
output:
bookdown::gitbook: default
documentclass: book
biblio-style: apalike
link-citations: yes
---
# Preparation for Workshop
Please follow the instructions in this section prior to attending the 2020 NABs conference.
## Install R and R Studio
Please install R and R Studio by following the links below.
```{r, echo=FALSE}
urls <- c("https://cran.r-project.org/bin/windows/base/",
"https://www.rstudio.com/products/rstudio/download/#download")
link.df <- data.frame(
Software = c("R", "R Studio"),
Link = paste0("[", urls, "](", urls, ")")
)
knitr::kable(link.df)
```
## Updating Software and Packages
### R
For Windows Operating Systems, run the following code in the RGui, __NOT__ in R Studio. The RGui should be installed when you install R. On my Windows machine, I access RGui by clicking on the R program file-- my current file name is "R x64 3.6.2".
<center>
<video width="960" height="540" controls>
<source src="images/2019-12-23_14-11-24.mp4" type="video/mp4">
</video>
</center>
Once you have the RGui open, copy and paste the R code below into the R Console window. Make sure R Studio is closed before running this code within the RGui. Hit enter once to install the __installr__ package. Hit enter a second time to run the __installer__ package function `updateR()` and follow the instructions.
This code was copied from: https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/).
```{r, eval=FALSE}
# installing/loading the package:
if(!require(installr)) {
install.packages("installr");
require(installr)
} #load / install+load installr
# using the package:
updateR()
```
### R Studio
1. Open R Studio
2. Click on "Help" on the toolbar
3. Click on "Check for Updates"
4. Follow instructions
<center>
<video width="960" height="540" controls>
<source src="images/rstudio_updates_final.mp4" type="video/mp4">
</video>
</center>
### R-Packages
1. Open R Studio
2. Click on "Tools" on the toolbar
3. Click on "Check for Package Updates…"
4. Follow instructions
<center>
<video width="960" height="540" controls>
<source src="images/update_packages.mp4" type="video/mp4">
</video>
</center>
#### Packages for the Workshop
Please run the following code within R Studio to make sure you have all of necessary packages for this workshop installed.
1. Open R Studio
2. Copy the following code
```{r, eval=FALSE}
package.vec <- c("tidyverse", "lubridate",
"knitr", "rmarkdown", "markdown", "bookdown", "caTools", "bitops",
"DT", "leaflet", "shiny", "jsonlite", "plotly",
"data.table", "rprojroot", "viridis")
install.packages(package.vec)
```
3. Paste the code into the Console within R Studio
4. Hit Enter
+ If prompted with "Do you want to restart R prior to installing?", select "Yes"
+ If prompted again then select "No"
5. The packages should begin to install. This may take some time.
<center>
<video width="960" height="540" controls>
<source src="images/install_workshop_packages.mp4" type="video/mp4">
</video>
</center>