generated from nmfs-opensci/NOAA-quarto-simple
-
Notifications
You must be signed in to change notification settings - Fork 32
/
swirl_lessons.qmd
56 lines (41 loc) · 1.74 KB
/
swirl_lessons.qmd
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
---
title: Swirl lessons
bibliography: references.bib
---
<!-- COMMENT NOT SHOW IN ANY OUTPUT: Code chunk below sets overall defaults for .qmd file; these inlcude showing output by default and looking for files relative to .Rpoj file, not .qmd file, which makes putting filesin different folders easier -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
```
[Swirl](https://swirlstats.com/){target="_blank"} is a program/package
that can help teach you R at your own pace. There are many swirl lessons
that are freely available (most of which I have not tried!). Given that,
you are free to explore them, but I have developed a set to follow our
class (with support of a [QUBES working
group](https://qubeshub.org/community/groups/teaching_r_fmn){target="_blank"}).
To work with them, you'll need to
- install swirl
- You can use the Install Packages option in Rstudio or type the
following into your console (or copy and paste it)!
```{r, eval=F}
install.packages("swirl")
```
- load the package and install the lessons for the book
- This will install swirl, load the package, and load the lessons.
```{r, eval=F}
library(swirl)
install_course_github("jsgosnell", "JSG_swirl_lessons")
```
- start swirl
```{r, eval=F}
swirl()
```
- Follow the on-screen prompts to select the CUNY_swirl course and the
lesson you want to focus on. Lesson names match the chapter names.
Note not all chapters have a matching swirl lesson!
Occasionally I update the lessons. If you want the latest version,
you'll need to uninstall the course
```{r, eval=F}
uninstall_course("JSG_swirl_lessons")
```
and then reinstall it following the original instructions.