@@ -4,20 +4,20 @@ title: Setup
4
4
5
5
## Overview
6
6
7
- The lesson infrastructure is built on Git, [ The R language] [ R ] , and [ pandoc] . It consists of
7
+ The lesson infrastructure is built on Git, the R language, and pandoc. It consists of
8
8
four components:
9
9
10
10
1 . The source content (plain markdown or RMarkdown files organized into folders
11
11
with a configuration yaml file)
12
12
2 . The engine (R package [ {sandpaper}] )to orchestrate building the content from
13
13
markdown to HTML
14
14
3 . The validator (R package [ {pegboard}] ) to parse the source files and
15
- highlight common errors[ ^ tinkr ]
15
+ highlight common errors
16
16
4 . The style (R package [ {varnish}] ) HTML, CSS, and JavaScript styling elements
17
17
for the final website
18
18
19
- [ Details of how these tools work together are explained in the Lesson
20
- Deployment] ( ../episodes/deployment.md ) chapter . In short, you can expect to
19
+ Details of how these tools work together are explained in the [ Lesson
20
+ Deployment chapter ] ( ../episodes/deployment.md ) . In short, you can expect to
21
21
interact with the source content and {sandpaper} to author and preview your
22
22
lesson.
23
23
@@ -26,19 +26,19 @@ lesson.
26
26
This setup document will walk you through the process of installing or upgrading
27
27
the required software in the following order.
28
28
29
- 1 . ** Git** (&ge ; 2.28 recommended)
30
- 2 . ** R ** (&ge ; 3.6 )
31
- 3 . ** pandoc** (&ge ; 2.11 )
29
+ 1 . ** [ Git] ** (&ge ; 2.28 recommended)
30
+ 2 . ** [ R ] ** (&ge ; 4.x )
31
+ 3 . ** [ pandoc] ** (&ge ; 3.x )
32
32
4 . The lesson infrastructure R packages
33
33
i. ** [ {sandpaper}] ** (development version)
34
34
ii. ** [ {varnish}] ** (development version)
35
35
iii. ** [ {pegboard}] ** (development version)
36
- iiii. ** [ {tinkr}] ** (markdown parser required by {pegboard}, development version )
36
+ iiii. ** [ {tinkr}] ** (markdown parser required by {pegboard})
37
37
38
38
Once you have Git, R, and Pandoc installed, these packages can be installed
39
39
and updated via:
40
40
``` r
41
- install.packages(c(" sandpaper" , " varnish" , " pegboard" , " tinkr " ),
41
+ install.packages(c(" sandpaper" , " varnish" , " pegboard" ),
42
42
repos = c(" https://carpentries.r-universe.dev/" , getOption(" repos" )))
43
43
```
44
44
@@ -48,10 +48,10 @@ If you are using R or pandoc for the first time, we recommend using [the RStudio
48
48
IDE] [ RStudio ] for the following reasons:
49
49
50
50
1 . It comes with [ pandoc] pre-installed.
51
- 2 . Works consistently across all major platforms.
52
- 3 . A dedicated BASH console so you can easily switch between R and Git
51
+ 2 . It works consistently across all major platforms.
52
+ 3 . It provides a dedicated BASH console so you can easily switch between R and Git
53
53
operations.
54
- 4 . Convenient keyboard shortcuts to preview lessons.
54
+ 4 . There are convenient keyboard shortcuts to preview lessons.
55
55
5 . On Windows, it will automatically detect your R installation without you
56
56
needing to edit your ` PATH ` .
57
57
@@ -66,9 +66,9 @@ should install R and pandoc separately and make sure that they are in your path.
66
66
This will guide you through installing the foundational software and
67
67
infrastructure packages on your computer. If you already have software
68
68
installed and are curious if you should update it to a newer version, the answer
69
- is almost always, yes, update to a newer version, because often the [ newer
69
+ is almost always, yes, update to a newer version, because often the newer
70
70
versions will contain important bug fixes that are important to the secruity of
71
- your computer] ( https://github.com/git/git/security/advisories/GHSA-8prw-h3cq-mghm ) .
71
+ your computer.
72
72
73
73
Jump to the installation instructions for your system: [ Windows] ( #windows ) ,
74
74
[ MacOS] ( #mac ) , or [ Linux] ( #linux )
@@ -77,15 +77,14 @@ Jump to the installation instructions for your system: [Windows](#windows),
77
77
78
78
### Git
79
79
80
- We recommend installing git via the Git for Windows installer at
81
- < https://gitforwindows.org/ > . The installer is going to ask a lot of questions,
82
- so we recommend [ using The Carpentries checklist for workshop
83
- participants] ( https://carpentries.github.io/workshop-template/#shell-windows ) .
80
+ We recommend installing git via the [ Git for Windows installer] ( https://gitforwindows.org/ ) . The installer is going to ask a lot of questions,
81
+ so we recommend [ using The Carpentries instructions for workshop
82
+ participants] ( https://carpentries.github.io/workshop-template/#the-bash-shell ) .
84
83
85
84
#### Test your installation
86
85
87
- To test that you have git installed, you can go to your taskbar at the bottom
88
- of your screen and type ` cmd ` to bring up the command prompt. From there, you
86
+ To test that you have git installed, open your command line by pressing < kbd >Windows</ kbd >+< kbd >R</ kbd >
87
+ and type ` cmd ` to bring up the command prompt. From there, you
89
88
can type ` git --version ` to see the version of your git installation. You might
90
89
see something like this:
91
90
@@ -107,10 +106,9 @@ operable program or batch file.
107
106
108
107
### R
109
108
110
- You can install the [ latest version of R] [ R ] for Windows from
111
- < https://cran.r-project.org/bin/windows/base/ > . There is also a video tutorial
109
+ Install the [ latest version of R for Windows] ( https://cran.r-project.org/bin/windows/base/ ) . There is also a video tutorial
112
110
up on [ The Carpentries instructions for workshop
113
- participants] ( https://carpentries.github.io/workshop-template/#rstats-windows )
111
+ participants] ( https://carpentries.github.io/workshop-template/#r-1 )
114
112
that can be quite helpful for parsing the steps of installing R on Windows.
115
113
116
114
::::::::::::::::::::: callout
@@ -128,10 +126,11 @@ that R will normally install at something like
128
126
` c:\Program Files\R\R-4.1.0\bin\x64 ` , but if you are not admin, it will install
129
127
in your Documents folder.
130
128
131
- To verify that R is installed in your ` PATH ` , you can go to your taskbar at the
132
- bottom of your screen and type ` cmd ` to bring up the command prompt. From there,
129
+ To verify that R is installed in your ` PATH ` , open your command line by pressing
130
+ <kbd >Windows</kbd >+<kbd >R</kbd >
131
+ and type ` cmd ` to bring up the command prompt. From there,
133
132
you can type ` R --version ` at the prompt. Your output should be similar to below,
134
- with a version ≥ 3.6 .
133
+ with a version ≥ 4.x .
135
134
136
135
``` bash
137
136
R --version
@@ -185,7 +184,7 @@ options(repos = c(
185
184
))
186
185
187
186
# Install the template packages to your R library
188
- install.packages(c(" sandpaper" , " varnish" , " pegboard" , " tinkr " ))
187
+ install.packages(c(" sandpaper" , " varnish" , " pegboard" ))
189
188
```
190
189
191
190
## Installing on MacOS {#mac}
@@ -195,12 +194,10 @@ install.packages(c("sandpaper", "varnish", "pegboard", "tinkr"))
195
194
### Git
196
195
197
196
You should have git pre-installed on your macOS, but it is likely that this is
198
- an old version. We recommend installing [ The latest version of Git for MacOS
199
- from sourceforge] ( https://sourceforge.net/projects/git-osx-installer/files/ )
200
- (** ignore the big green button** and choose the latest version from the list).
201
- For a video walkthrough and an explanation of what to expect, you can look at
197
+ an old version. We recommend installing [ The latest version of Git for MacOS] ( https://git-scm.com/downloads/mac ) .
198
+ For a video guide, you can look at
202
199
the [ instructions for workshop
203
- participants] ( https://carpentries.github.io/workshop-template/#git-macos ) .
200
+ participants] ( https://carpentries.github.io/workshop-template/#git-1 ) .
204
201
205
202
#### Test your installation
206
203
@@ -247,7 +244,7 @@ that can be quite helpful for parsing the steps of installing R on MacOS.
247
244
248
245
You can test your installation of R by opening ** Terminal.app** and typing `R
249
246
--version` into the prompt. Your output should be similar to below,
250
- with a version ≥ 3.6 .
247
+ with a version ≥ 4.x .
251
248
252
249
``` bash
253
250
R --version
@@ -272,7 +269,7 @@ There are two ways to install pandoc:
272
269
273
270
Since pandoc comes bundled with RStudio, you can install it by installing the
274
271
latest version of RStudio. You can [ download the installer from the RStudio
275
- website] [ RStudio ] . RStudio will be a ` *.dmg ` (disk image) that you will open
272
+ website] [ RStudio ] . RStudio will be a ` *.dmg ` (disk image) that you will
276
273
double click to open a window that will look something like this:
277
274
278
275
![ ] ( fig/rstudio-mac-install.png ) {alt="Installation window for RStudio on mac
@@ -284,9 +281,9 @@ to install RStudio on your computer.
284
281
285
282
#### Via the pandoc website
286
283
287
- If are more comfortable using R from the command line, then you can install
288
- pandoc by clicking the "Download the latest installer for macOS" button at
289
- < https://pandoc.org/installing.html > . This will save a file called
284
+ If are more comfortable using R from the command line, then you can [ install
285
+ pandoc] ( https://pandoc.org/installing.html ) by clicking the "Download the latest
286
+ installer for macOS" button . This will save a file called
290
287
` pandoc-X.XX-macOS.pkg ` installer to your computer. Open the installer and
291
288
follow the instructions to install pandoc on your computer.
292
289
@@ -309,7 +306,7 @@ options(repos = c(
309
306
))
310
307
311
308
# Install the template packages to your R library
312
- install.packages(c(" sandpaper" , " varnish" , " pegboard" , " tinkr " ))
309
+ install.packages(c(" sandpaper" , " varnish" , " pegboard" ))
313
310
```
314
311
315
312
## Installing on Linux {#linux}
@@ -371,7 +368,7 @@ sudo apt install --no-install-recommends r-base
371
368
372
369
Test your R installation by opening your terminal and running
373
370
` R --version ` into the prompt. Your output should be similar to below,
374
- with a version ≥ 3.6 .
371
+ with a version ≥ 4.x .
375
372
376
373
``` bash
377
374
R --version
@@ -500,7 +497,7 @@ options(repos = c(
500
497
))
501
498
502
499
# Install the template packages to your R library
503
- install.packages(c(" sandpaper" , " varnish" , " pegboard" , " tinkr " ))
500
+ install.packages(c(" sandpaper" , " varnish" , " pegboard" ))
504
501
```
505
502
506
503
::::::::::::: discussion
@@ -741,7 +738,9 @@ setting up authentication credentials for your account:
741
738
742
739
::::::::::::::::::::::::
743
740
741
+ [ Git ] : https://git-scm.com/
744
742
[ R ] : https://cran.rstudio.org/
743
+ [ pandoc ] : https://pandoc.org/
745
744
[ {tinkr} ] : https://docs.ropensci.org/tinkr/
746
745
[ RStudio ] : https://rstudio.com/products/rstudio/download/#download
747
746
[ ^ workspace ] : By default, R will ask if you want to save your workspace to a
@@ -751,6 +750,3 @@ setting up authentication credentials for your account:
751
750
packages very very difficult. In 2017 Jenny Bryan wrote a very good article
752
751
about the benefits of having a project-based workflow, starting from a clean
753
752
slate: < https://www.tidyverse.org/blog/2017/12/workflow-vs-script/ >
754
-
755
- [ ^ tinkr ] : Note: {pegboard} requires the [ {tinkr}] package from rOpenSci. It
756
- is still in development, so we will install this package explicitly.
0 commit comments