Skip to content

Commit 23a2968

Browse files
polishing new setup chapter
1 parent 357047f commit 23a2968

File tree

1 file changed

+28
-32
lines changed

1 file changed

+28
-32
lines changed

setup.Rmd

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -121,38 +121,43 @@ tab in your default browser with the JupyterLab interface. To exit out of
121121
JupyterLab you can click `File -> Shutdown`, or go to the terminal from which
122122
you launched JupyterLab, hold `Ctrl`, and press `C` twice.
123123
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:
125130
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,
128138
you will need to install the R programming language,
129139
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,
134142
type the command shown below into the Anaconda Prompt (Windows)
135143
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-
142144
```
143145
conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml
144146
```
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.
145152
146-
> You can also install the latest version of R
153+
> You can also install the *latest* version of R
147154
> and the R packages used in this book by typing the commands shown below
148155
> in the Anaconda Prompt (Windows)
149156
> 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!
156161
> ```
157162
> conda install -c conda-forge -y \
158163
> r-base \
@@ -171,17 +176,6 @@ conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-
171176
> unixodbc
172177
> ```
173178
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-
185179
### LaTeX
186180
187181
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.
247241
248242
It is good practice to restart all the programs you used when installing this
249243
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).
250246
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.
252248
253249
## Downloading the worksheets for this book
254250

0 commit comments

Comments
 (0)