Skip to content

Commit 16f945e

Browse files
committed
rewording
1 parent 38ba439 commit 16f945e

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

version-stable-r-development.Rmd

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ knitr::opts_chunk$set(echo = TRUE, collapse = TRUE, eval = FALSE)
66
```
77

88
In the context of productive solutions, it is essential to have full control
9-
over the code-base and environment to ensure reproducibility and stability of
9+
over the codebase and environment to ensure reproducibility and stability of
1010
the setup. In the case of R-based projects, this implies fixing and aligning the
1111
version of R as well as package and system dependencies. In order to achieve
1212
well-managed release pipelines, a key aspect is to guarantee full equivalence of
@@ -53,7 +53,7 @@ for an example.
5353
When developing and testing an app locally, it is important to ensure the
5454
environment is aligned with the target deployment environment. This might imply
5555
using e.g. multiple R and package versions for the local development of
56-
different applications, which clash with the typical setup (especially on
56+
different applications. This is not possible with the typical setup (especially on
5757
Linux systems), where only one R version (the latest release) exists.
5858

5959
The idea is then to rely on the same version-stable rocker containers used for
@@ -64,9 +64,9 @@ use e.g. `rocker/rstudio:4.4.1`.
6464

6565
Note that the same version-stable instance of RStudio can be used across all
6666
different projects for which such version is relevant. For this reason, a
67-
sensible choice is to rely on `rocker/verse`, which adds tidyverse and
68-
devtools to the stack, as well as properly setting up R Markdown system
69-
dependencies TinyTeX and `pandoc`, sparing the effort of the tedious extra
67+
sensible choice is to rely on `rocker/verse` images, which add tidyverse and
68+
devtools to the stack. They also include R Markdown system
69+
dependencies TinyTeX and pandoc, sparing the effort of the tedious extra
7070
install. See the specific section below about 'TinyTeX considerations'.
7171

7272

@@ -89,7 +89,7 @@ following setup:
8989
- Use a version-specific port, e.g. `4000` for R 4.0.0, `4410` for R 4.4.1 and
9090
so on, so that we can use `localhost` for concurrent R version instances.
9191
- The development code of all relevant projects should live outside the
92-
container and be shared with it (and possibly many of them), e.g. under
92+
container and be shared with it (and possibly multiple other containers), e.g. under
9393
`~/RStudioProjects` on the host machine and `/home/rstudio/RStudioProjects` in
9494
the container.
9595
- For this to work w/o [permission
@@ -100,10 +100,10 @@ the container.
100100
`~/.rstudio-docker/4.4.1`) for the `home/rstudio/.rstudio` directory, which is
101101
version-specific in case of multiple R versions
102102
- If we want to use Meld via the [compareWith](https://github.com/miraisolutions/compareWith/) addins, we need to
103-
- map the `DISPLAY` environment variable and volume `/tmp/.X11-unix`
104-
- add `DISPLAY` to `Renviron`
105-
- install Meld
106-
- install `dbus-x11`
103+
- map the `DISPLAY` environment variable and volume `/tmp/.X11-unix`,
104+
- add `DISPLAY` to `Renviron`,
105+
- install Meld,
106+
- install `dbus-x11`.
107107
- Use a version-specific name for the container running the RStudio instance,
108108
e.g. `rstudio_4.4.1`.
109109

@@ -132,7 +132,7 @@ docker exec rstudio_$R_VER bash -c \
132132
```
133133
If you are using R_VER=4.4.1, the running RStudio can then be accessed by visiting `http://localhost:4410/`.
134134

135-
You may find convenient to define a shell function as follows
135+
You may find convenient to define a shell function for these steps:
136136

137137
```{bash run_rstudio_ver-def}
138138
run_rstudio_ver() {
@@ -169,7 +169,7 @@ run_rstudio_ver() {
169169
}
170170
```
171171

172-
which you can re-use as compact command for any R version as follows
172+
which you can re-use as compact command for any R version:
173173
```{bash run_rstudio_ver-use}
174174
run_rstudio_ver 4.4.1 RStudioProjects
175175
```
@@ -200,7 +200,7 @@ This is why we use a mounted volume for the `~/.rstudio` directory.
200200
Older `rocker/verse` images might not include `pdfcrop`, which is required for
201201
the default and desirable cropping of PDF figures with R Markdown (see
202202
[rocker-org/rocker-versioned#146](https://github.com/rocker-org/rocker-versioned/issues/146)).
203-
Make sure `pdfcrop` is installed by running at R console
203+
Make sure `pdfcrop` is installed by running the following in the R console:
204204
```{r pdfcrop}
205205
tinytex::tlmgr_install("pdfcrop")
206206
```

0 commit comments

Comments
 (0)