@@ -121,38 +121,43 @@ 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, R packages and the IRkernel
124
+ To improve the experience of using R in JupyterLab, we will add an extension
125
+ that allows us to set up keyboard shortcuts for inserting text.
126
+ By default,
127
+ this extension creates shortcuts for inserting two of the most common R
128
+ operators: `<-` and `|>`. Type the following in the Anaconda Prompt (Windows)
129
+ or terminal (MacOS and Ubuntu) and press enter:
125
130
126
- To have R \index{R!installation}
127
- and the R packages used in this book available to you in JupyterLab,
131
+ ```
132
+ jupyter labextension install @techrah/text-shortcuts
133
+ ```
134
+
135
+ ### R, R packages, and the IRkernel
136
+
137
+ To have the software \index{R!installation} used in this book available to you in JupyterLab,
128
138
you will need to install the R programming language,
129
139
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,
140
+ and the \index{kernel!installation} IRkernel.
141
+ To install versions of these that are compatible with the accompanying worksheets,
134
142
type the command shown below into the Anaconda Prompt (Windows)
135
143
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.
141
-
142
144
```
143
145
conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml
144
146
```
147
+ This command installs the specific R and package versions specified in
148
+ the `environment.yml` file found in
149
+ [the worksheets repository](https://ubc-dsci.github.io/data-science-a-first-intro-worksheets).
150
+ We will always keep the versions in the `environment.yml` file updated
151
+ so that they are compatible with the exercise worksheets that accompany the book.
145
152
146
- > You can also install the latest version of R
153
+ > You can also install the * latest* version of R
147
154
> and the R packages used in this book by typing the commands shown below
148
155
> in the Anaconda Prompt (Windows)
149
156
> 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
- >
157
+ > **Be careful though:** this may install package versions that are
158
+ > incompatible with the worksheets that accompany the book; the automated
159
+ > exercise feedback might tell you your answers are not correct even though
160
+ > they are!
156
161
> ```
157
162
> conda install -c conda-forge -y \
158
163
> r-base \
@@ -171,17 +176,6 @@ conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-
171
176
> unixodbc
172
177
> ```
173
178
174
- To improve the experience of using R in JupyterLab, we will add an extension
175
- that allows us to set up keyboard shortcuts for inserting text.
176
- By default,
177
- this extension creates shortcuts for inserting two of the most common R
178
- operators: `<-` and `|>`. Type the following in the Anaconda Prompt (Windows)
179
- or terminal (MacOS and Ubuntu) and press enter:
180
-
181
- ```
182
- jupyter labextension install @techrah/text-shortcuts
183
- ```
184
-
185
179
### LaTeX
186
180
187
181
To be able to render `.ipynb` files to `.pdf` you need to install a LaTeX
@@ -247,8 +241,10 @@ to save and close the file.
247
241
248
242
It is good practice to restart all the programs you used when installing this
249
243
software stack before you proceed to doing your data analysis.
244
+ This includes restarting JupyterLab as well as the terminal (MacOS and Ubuntu)
245
+ or the Anaconda Prompt (Windows).
250
246
This will ensure all the software and settings you put in place are
251
- correctly sourced. This includes JupyterLab, terminal or Anaconda Prompt.
247
+ correctly sourced.
252
248
253
249
## Downloading the worksheets for this book
254
250
0 commit comments