@@ -121,18 +121,56 @@ tab in your default browser with the JupyterLab interface. To exit out of
121
121
JupyterLab you can click `File -> Shutdown`, or go to the terminal from which
122
122
you launched JupyterLab, hold `Ctrl`, and press `C` twice.
123
123
124
- ### R and the IRkernel
125
-
126
- To have R \index{R!installation} available to you in JupyterLab,
127
- you will need to install the R programming language and the \index{kernel!installation} IRkernel R package.
128
- To install these, type the following into
129
- the Anaconda Prompt (Windows) or terminal (MacOS and Ubuntu):
124
+ ### R, R packages and the IRkernel
125
+
126
+ To have R \index{R!installation}
127
+ and the R packages used in this book available to you in JupyterLab,
128
+ you will need to install the R programming language,
129
+ several R packages,
130
+ and the \index{kernel!installation} IRkernel R package.
131
+
132
+ To install these
133
+ using the same versions used in the exercise worksheets that accompany the book,
134
+ type the command shown below into the Anaconda Prompt (Windows)
135
+ or terminal (MacOS and Ubuntu).
136
+ This command installs specific R and R package versions specified in
137
+ this [`environment.yml` file](https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml).
138
+ We will always keep the versions in this `environment.yml` file
139
+ consistent with the R and R package versions
140
+ used in the exercise worksheets that accompany the book.
130
141
131
142
```
132
- conda install -c conda-forge -y r-base=4.1.1
133
- conda install -c conda-forge -y r-irkernel
143
+ conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml
134
144
```
135
145
146
+ > You can also install the latest version of R
147
+ > and the R packages used in this book by typing the commands shown below
148
+ > in the Anaconda Prompt (Windows)
149
+ > or terminal (MacOS and Ubuntu) and pressing enter.
150
+ > Note that this may install a different version of the packages
151
+ > than were used in the exercise worksheets that accompany the book,
152
+ > which may lead to some incompatibilities between the code run
153
+ > and the automated exercise worksheet feedback.
154
+ >
155
+ >
156
+ > ```
157
+ > conda install -c conda-forge -y \
158
+ > r-base \
159
+ > r-cowplot \
160
+ > r-ggally \
161
+ > r-gridextra \
162
+ > r-irkernel \
163
+ > r-kknn \
164
+ > r-rpostgres \
165
+ > r-rsqlite \
166
+ > r-scales \
167
+ > r-testthat \
168
+ > r-tidymodels \
169
+ > r-tidyverse \
170
+ > r-tinytex \
171
+ > unixodbc
172
+ > ```
173
+
136
174
To improve the experience of using R in JupyterLab, we will add an extension
137
175
that allows us to set up keyboard shortcuts for inserting text.
138
176
By default,
@@ -144,28 +182,6 @@ or terminal (MacOS and Ubuntu) and press enter:
144
182
jupyter labextension install @techrah/text-shortcuts
145
183
```
146
184
147
- ### R packages
148
-
149
- To install the packages \index{package} used in this book,
150
- type the following in the Anaconda Prompt (Windows)
151
- or terminal (MacOS and Ubuntu) and press enter:
152
-
153
- ```
154
- conda install -c conda-forge -y \
155
- r-cowplot=1.1.* \
156
- r-ggally=2.1.* \
157
- r-gridextra=2.3 \
158
- r-kknn=1.3.* \
159
- r-rpostgres=1.2.* \
160
- r-rsqlite=2.2.* \
161
- r-scales=1.1.* \
162
- r-testthat=3.0.* \
163
- r-tidymodels=0.1.* \
164
- r-tidyverse=1.3.* \
165
- r-tinytex=0.33 \
166
- unixodbc=2.3.*
167
- ```
168
-
169
185
### LaTeX
170
186
171
187
To be able to render `.ipynb` files to `.pdf` you need to install a LaTeX
0 commit comments