@@ -167,7 +167,7 @@ its website at <https://pandoc.org/installing.html>
167
167
168
168
#### Test your installation
169
169
170
- We will wait to test the pandoc installation after we install the
170
+ We will wait to test the pandoc installation after we have installed the
171
171
infrastructure packages, to make sure it's discoverable by R.
172
172
173
173
### Infrastructure R packages
@@ -289,7 +289,7 @@ follow the instructions to install pandoc on your computer.
289
289
290
290
#### Test your installation
291
291
292
- We will wait to test the pandoc installation after we install the
292
+ We will wait to test the pandoc installation after we have installed the
293
293
infrastructure packages, to make sure it's discoverable by R.
294
294
295
295
### Infrastructure R packages
@@ -311,20 +311,18 @@ install.packages(c("sandpaper", "varnish", "pegboard"))
311
311
312
312
## Installing on Linux {#linux}
313
313
314
- A lot of the documentation for Linux is nuanced because it assumes that if you
315
- use Linux, then you automatically know how to install things by the command
316
- line. I will be providing instructions as best I can for Ubuntu Linux and point
317
- to resourced for other distributions. For Ubuntu/Debian, the default ` apt `
318
- repository is often out of date, so you will need to use a
314
+ Instructions for installing on Linux are nuanced due to the variety and availability of
315
+ libraries and dependencies for each distribution, e.g. Ubuntu is Debian based whereas
316
+ Fedora is Red Hat based. These instructions will use Ubuntu as the preferred distribution.
317
+ The default ` apt ` repository is often out of date, so you will need to use a
319
318
[ Personal Package Archive aka PPA] ( https://itsfoss.com/ppa-guide/ ) to install
320
- the latest version of a particular software, which I will include in these
319
+ the latest version of a particular software, which will be included in these
321
320
instructions.
322
321
323
322
### Git
324
323
325
- You should have git pre-installed on your computer, but it will likely be
326
- outdated. It's okay if this is the case, but if you want to update via ` apt ` ,
327
- you can add the git-core ppa:
324
+ Many distributions include git by default, but it is often outdated.
325
+ It is useful to try to update in case a newer version is available:
328
326
329
327
``` bash
330
328
sudo add-apt-repository ppa:git-core/ppa
@@ -345,9 +343,9 @@ git version 2.31.1
345
343
346
344
### R
347
345
348
- To install R, you can visit < https://cran.r-project.org/bin/linux/ > to check if
349
- your platform is supported. For Ubuntu, there are detailed instructions at:
350
- < https://cran.r-project.org/bin/linux/ubuntu/ > . Here are the commands to register
346
+ To install R, you can visit [ CRAN's Linux page ] ( https://cran.r-project.org/bin/linux/ ) to check if
347
+ your platform is supported. Detailed instructions exist [ for Ubuntu ] ( https://cran.r-project.org/bin/linux/ubuntu/ ) .
348
+ Here are the commands to register
351
349
the PPA on your machine and then install R:
352
350
353
351
``` bash
@@ -393,11 +391,11 @@ There are two ways to install pandoc:
393
391
394
392
#### Via RStudio (recommended)
395
393
396
- Since pandoc comes bundled with RStudio, you can install it by installing the
397
- latest version of RStudio. You can [ download the installer from the RStudio
394
+ Pandoc comes bundled with RStudio. You can [ download the installer from the RStudio
398
395
website] [ RStudio ] . When installing RStudio for Linux, your distribution may not
399
- be shown on the landing page (e.g. Ubuntu 20.04). In this case, choose the most
400
- recent version and download it to your Downloads folder or install it directly.
396
+ be shown on the landing page. If your Ubuntu version is not listed, check the
397
+ [ RStudio Previous Versions] ( https://docs.posit.co/previous-versions/rstudio.html ) page
398
+ to see if there are builds available.
401
399
402
400
::::::::::: callout
403
401
@@ -411,45 +409,42 @@ instructions at <https://posit.co/code-signing/>.
411
409
412
410
#### Via the pandoc website
413
411
414
- If are more comfortable using R from the command line, then you can install
415
- pandoc by clicking the "Download the latest installer" button at
416
- < https://pandoc.org/installing.html > . This will bring you to the release page
417
- on GitHub with a list of installers, and you should choose one of the ones that
418
- says "linux" according to what chip architecture you have (AMD vs ARM).
412
+ If you are more comfortable using R from the command line, then you can install
413
+ pandoc from the [ releases page] ( https://pandoc.org/installing.html ) . From the list on the GitHub page,
414
+ for Ubuntu, choose the appropriate ` .deb ` file for your chip architecture (i.e. AMD64 or ARM64).
419
415
420
416
#### Test your installation
421
417
422
- We will wait to test the pandoc installation after we install the
418
+ We will wait to test the pandoc installation after we have installed the
423
419
infrastructure packages, to make sure it's discoverable by R.
424
420
425
421
### Infrastructure R packages
426
422
427
- Linux packages normally need to be compiled by your system, which can take a
423
+ Linux packages normally need to be compiled into binaries by your system, which can take a
428
424
long time the first time it happens. RStudio provides a package manager that
429
425
pre-compiles Linux binaries. Note that you do not have to be using RStudio to
430
426
take advantage of these binaries. The one we are using is set up for Ubuntu
431
- 20 .04 (focal ).
427
+ 22 .04 (jammy ).
432
428
433
429
::::: callout
434
430
435
431
#### Dependencies of Dependencies
436
432
437
433
If you are not used to installing software on Linux, it can be frustrating
438
- sometimes because few things ever "just work" when you try to install them . The
434
+ sometimes because things can go wrong and it’s not always immediately clear why . The
439
435
same is true for some R packages with compiled code.
440
436
441
437
Some packages require underlying C libraries (e.g. the xml2 library), which are
442
438
catalogued for Ubuntu in [ The Carpentries R
443
439
Universe] ( https://carpentries.r-universe.dev/ui#builds ) and [ available via the
444
- API] ( https://carpentries.r-universe.dev/ui#api ) . If you want to view the
445
- packages that are required (some of which may already be on your system), you
446
- can use ` curl ` and ` jq ` to produce a list:
440
+ API] ( https://carpentries.r-universe.dev/apis ) . To produce a list
441
+ (you may need to ` sudo apt install jq ` if it is not already on your system):
447
442
448
443
``` bash
449
444
curl https://carpentries.r-universe.dev/stats/sysdeps 2> /dev/null | jq -r ' .headers[0] | select(. != null)'
450
445
```
451
446
452
- This list can be sent to ` apt-get install ` to install everything:
447
+ This list can be sent to ` apt install ` to install everything:
453
448
454
449
``` bash
455
450
sudo apt-get install -y \
@@ -504,9 +499,8 @@ install.packages(c("sandpaper", "varnish", "pegboard"))
504
499
505
500
#### Saving these settings for later
506
501
507
- Having binary packages for Linux was a game changer when they appeared and it's
508
- a good idea to have the above code run every time you start R so that you can
509
- take advantage of them. Add the code below to your ` ~/.Rprofile ` .
502
+ To not have to run this block of code every time you want to update,
503
+ add the following code into your ` ~/.Rprofile ` to run it every time you open your terminal:
510
504
511
505
::::::::::::::::::::::::
512
506
@@ -567,6 +561,7 @@ compilation terminated.
567
561
568
562
Use the instructions in these logs to install the correct package from your
569
563
terminal and then open R or RStudio and retry installing the packages.
564
+ For example, for the error above, use ` sudo apt install libxslt1-dev ` .
570
565
571
566
:::::::::::::::::::::
572
567
@@ -620,27 +615,14 @@ fs::dir_tree(tmp, recurse = 1)
620
615
```
621
616
622
617
If the installation did not work, please [ raise an issue on
623
- GitHub] ( https://github.com/carpentries/sandpaper-docs/issues/new ) and I can help
624
- troubleshoot.
618
+ GitHub] ( https://github.com/carpentries/sandpaper-docs/issues/new ) .
625
619
626
620
## Installation FAQ
627
621
628
622
### Why does it take 5 lines of code to install the infrastructure?
629
623
630
- In the future, this will be ONE line of code!
631
-
632
- Since we are currently in the alpha phase of testing, the infrastructure can
633
- update at any moment. Normally, packages will come from
634
- [ CRAN] ( https://glosario.carpentries.org/en/#cran ) , but our development packages
635
- are not yet on CRAN, so the are stored in The Carpentries and rOpenSci
636
- development repositories.
637
-
638
- ### Do I really need to use RStudio?
639
-
640
- No. We recommend using RStudio for [ several reasons that pertain to ease of
641
- use and standardisation across systems] ( #recommend ) , but we do not absolutely
642
- require it. If you are able to get Git, R, and pandoc installed on your system,
643
- then you do not need to use RStudio.
624
+ As the Workbench packages are in The Carpentries R-Universe and not CRAN,
625
+ we need to tell R to get the packages from R-Universe.
644
626
645
627
### What is an R Library?
646
628
@@ -653,17 +635,25 @@ Installing packages into ‘c:/Users/USER/Documents/R/win-library/4.0’
653
635
(as ‘lib’ is unspecified)
654
636
```
655
637
638
+ On Ubuntu, this may look like:
639
+
640
+ ```
641
+ Installing packages into ‘/home/<user>/R/x86_64-pc-linux-gnu-library/4.4’
642
+ ```
643
+
656
644
This folder is where all of the R packages you install via ` install.packages() `
657
645
will live. If you ever need to look this up, you can use the ` .libPaths() `
658
- function.
646
+ function.
647
+
648
+ ### Using a personal library
659
649
660
650
Sometimes, your R session will issue a warning that says a folder is not
661
651
writeable and asks if you would like to use a personal library instead. In this
662
652
case, select "yes".
663
653
664
- ## Using the lesson engine
654
+ ## Opening your R environment
665
655
666
- Throughout the lesson, I will ask you to ** open R or RStudio ** . If you are using
656
+ If you are using
667
657
RStudio, you can open it by double-clicking on the RStudio icon in your
668
658
application launcher; you do not have to open R separately to use RStudio.
669
659
@@ -712,6 +702,9 @@ If you do not have this set up, you should [choose a protocol
712
702
] ( https://docs.github.com/en/github/getting-started-with-github/about-remote-repositories )
713
703
and then set them up according to the instructions from GitHub.
714
704
705
+ It’s recommended to use the SSH protocol, unless you explicitly cannot,
706
+ e.g. behind an institutional firewall or proxy.
707
+
715
708
:::::::::::::::: callout
716
709
717
710
### Is GitHub's Documentation Confusing?
0 commit comments