-
Notifications
You must be signed in to change notification settings - Fork 1
/
add-r-resources.Rmd
226 lines (175 loc) · 5.56 KB
/
add-r-resources.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
---
title: "**Additional R Resources**"
output:
html_document:
includes:
in_header: header.html
editor_options:
chunk_output_type: console
---
<div class = "row">
<div class = "col-md-6">
![Do you have a moment to learn about *R* Lord and Saviour?](images/RLordAndSaviour.jpg)
</div>
<div class = "col-md-6">
# Don't forget to Install R!
Submit an [IT request](https://sites.google.com/a/noaa.gov/afsc-home/it-services/service-desk) to have the latest version of these softwares installed:
#### [R](https://cran.r-project.org/bin/windows/base/)
The base graphical user interface (GUI) program, which is needed to run RStudio.
#### [RStudio](https://rstudio.com/products/rstudio/download/)
an integrated development environment (IDE) is a set of tools designed to help you be more productive with R. (There are some weathered souls out there who endeavor to use the R GUI, but we assure you that the RStudio interface is much nicer to work in!)
#### [RTools](https://cran.r-project.org/bin/windows/Rtools/)
Base tools needed for some functions and packages to work in R.
</div>
# Additional Video Tutorials
These videos were created by Aaron Mamula for the R Workshop for NMFS Social Scientists Workshop held back in September 2020. These are great tutorial videos within and beyond the scope of our class. Students are not required to view each video. Enjoy!
*Please click on the title to see the session description*
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, warning=FALSE, error = FALSE, message = FALSE)
library(tidyverse)
library(lubridate)
library(htmltools)
```
```{r}
PreMaterial <- data.frame(read_csv("./R Workshop Video Links.csv", col_names = FALSE))
names(PreMaterial)<-PreMaterial[2,]
PreMaterial<-PreMaterial[-c(1:3),]
PreMaterial<-PreMaterial[!(is.na(PreMaterial$Topic)),]
PreMaterial0 <- PreMaterial
PreMaterial$NeedToKnow<-c(paste0("Importance Level: ",PreMaterial$`Importance Level`[1]), PreMaterial$`Importance Level`[-1])
PreMaterial$Notes<-gsub(pattern = '"', replacement = "'", x = PreMaterial$Notes)
PreMaterial$Notes0<-paste0('tags$li(
tags$p("Fun-ness: ', PreMaterial$`Fun-ness`, '"),
tags$p("Suggested For: ', PreMaterial$`Suggested for`, '"),',
ifelse(is.na(PreMaterial$Notes), "",
paste0('
tags$p("', PreMaterial$Notes, '"),
')),
'tags$a(href="', PreMaterial$`Video Link`, '", "Video Link"),
tags$p(""),
tags$a(href="', PreMaterial$Playlist, '", "Playlist Link"))')
PreMaterial$Title<-(PreMaterial$Topic)
PreMaterial$Authors<-"Aaron Mamula"
PreMaterial<-data.frame(PreMaterial)
rownames(PreMaterial)<-1:nrow(PreMaterial)
```
```{css}
.schedule {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.limit {
width: 100%;
padding: 5px 0 5px 0;
}
.workshops-button {
padding: 0.75em 1.25em;
background-color: #cccccc;
opacity: 0.9;
width: auto;
color: black;
text-align: center;
overflow: auto;
}
.workshops-button {
padding: 0.75em 1.25em;
background-color: #cccccc;
opacity: 0.9;
width: auto;
color: black;
text-align: center;
overflow: auto;
}
.left-date {
width: 20%;
float: left;
text-align: left;
}
.center-title {
width: 60%;
float: left;
text-align: left;
font-size: 120%;
}
.right-authors {
width: 20%;
float: right;
text-align: right;
}
.workshops {
margin: 1em 1em 0 0;
}
.active {
background-color: #333333;
color: whitesmoke;
}
```
```{js}
function main() {
$('.schedule').hide();
$('.schedule').fadeIn(2000);
$('.workshops').hide();
$('.workshops-button').on('click', function() {
$(this).next().slideToggle(400);
$(this).toggleClass('active');
});
}
$(document).ready(main);
```
```{r}
counter<-1
```
### `r unique(PreMaterial$Playlist.Title)[counter] `
```{r}
program1<-PreMaterial[PreMaterial$Playlist.Title %in% unique(PreMaterial$Playlist.Title)[counter],]
div(
class = "schedule",
apply(program1, 1, function(event) {
div(
class = "limit",
div(class = "workshops-button",
div(class = "left-date",
# (eval(parse(text=event[['NeedToKnow']])))),
event[['NeedToKnow']]),
div(class = "center-title",
# tags$i(event[['Title']])),
tags$b(event[['Title']])),
div(class = "right-authors",
event[['Authors']])),
tags$ul(class = "workshops",
(eval(parse(text=event[["Notes0"]])) ) )
# event[["Notes"]])
)
})
)
counter<-counter + 1
```
<br>
### `r unique(PreMaterial$Playlist.Title)[counter] `
```{r}
program1<-PreMaterial[PreMaterial$Playlist.Title %in% unique(PreMaterial$Playlist.Title)[counter],]
div(
class = "schedule",
apply(program1, 1, function(event) {
div(
class = "limit",
div(class = "workshops-button",
div(class = "left-date",
# (eval(parse(text=event[['NeedToKnow']])))),
event[['NeedToKnow']]),
div(class = "center-title",
# tags$i(event[['Title']])),
tags$b(event[['Title']])),
div(class = "right-authors",
event[['Authors']])),
tags$ul(class = "workshops",
(eval(parse(text=event[["Notes0"]])) ) )
# event[["Notes"]])
)
})
)
counter<-counter + 1
```
<br>
*This page was last updated `r format(Sys.time(), "%A %B %d %Y %X %Z")`*