You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jupyter.Rmd
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -18,21 +18,21 @@ with the text and images serving as narration for the code and its output.
18
18
In this chapter we will show you how to accomplish this using Jupyter notebooks, a common coding platform in
19
19
data science. Jupyter notebooks do precisely what we need: they let you combine text, images, and (executable!) code in a single
20
20
document. In this chapter, we will focus on the *use* of Jupyter notebooks to program in R and write
21
-
text via a web-interface.
21
+
text via a webinterface.
22
22
These skills are essential to getting your analysis running; think of it like getting dressed in the morning!
23
23
Note that we assume that you already have Jupyter set up and ready to use. If that is not the case, please first read
24
24
Chapter \@ref(move-to-your-own-machine) to learn how to install and configure Jupyter on your own
25
25
computer.
26
26
27
27
## Chapter learning objectives
28
28
29
-
By the end of the chapter, readers will be able to:
29
+
By the end of the chapter, readers will be able to do the following:
30
30
31
-
-create new Jupyter notebooks
32
-
-write, edit, and execute R code in a Jupyter notebook
33
-
-write, edit, and view text in a Jupyter notebook
34
-
-open and view plain text data files in Jupyter
35
-
-export Jupyter notebooks to other standard file types (e.g., `.html`, `.pdf`)
31
+
-Create new Jupyter notebooks.
32
+
-Write, edit, and execute R code in a Jupyter notebook.
33
+
-Write, edit, and view text in a Jupyter notebook.
34
+
-Open and view plain text data files in Jupyter.
35
+
-Export Jupyter notebooks to other standard file types (e.g., `.html`, `.pdf`).
36
36
37
37
## Jupyter
38
38
@@ -42,7 +42,7 @@ documents that contain a mix of computer code (and its output) and formattable
42
42
text. Given that they combine these two analysis artifacts in a single
43
43
document—code is not separate from the output or written report—notebooks are
44
44
one of the leading tools to create reproducible data analyses. Reproducible data
45
-
analysis \index{reproducible} is one where you can reliably and easily recreate the same results when
45
+
analysis \index{reproducible} is one where you can reliably and easily re-create the same results when
46
46
analyzing the same data. Although this sounds like something that should always
47
47
be true of any data analysis, in reality, this is not often the case; one needs
48
48
to make a conscious effort to perform data analysis in a reproducible manner.
@@ -100,7 +100,7 @@ workflow typically used to ensure that your analysis runs in its entirety before
100
100
sharing it with others, and when using a notebook as part of an automated
101
101
process.
102
102
103
-
To run the a code cell independently, the cell needs to first be activated. This
103
+
To run a code cell independently, the cell needs to first be activated. This
104
104
is done by clicking on it with the cursor. Jupyter will indicate a cell has been
105
105
activated by highlighting it with a blue rectangle to its left. After the cell
106
106
has been activated (Figure \@ref(fig:activate-and-run-button)), the cell can be run by either pressing the **Run** (`r fa("play", height = "11px")`)
@@ -247,16 +247,17 @@ notebook that references `y` and execute it without error in the current session
247
247
(Figure \@ref(fig:out-of-order-2)). This could also be done successfully in
248
248
future sessions if, and only if, you run the cells in the same non-conventional
249
249
order. However, it is difficult to remember this non-conventional order, and it
250
-
is not the order that others would expect your code to be executed in. Thus in
251
-
future this would lead to errors when the notebook is run in the conventional
250
+
is not the order that others would expect your code to be executed in. Thus, in
251
+
the future, this would lead
252
+
to errors when the notebook is run in the conventional
252
253
linear order (Figure \@ref(fig:out-of-order-3)).
253
254
254
255
```{r out-of-order-1, echo = FALSE, fig.cap = "Code that was written out of order, but not yet executed.", fig.retina = 2, out.width="100%"}
255
256
image_read("img/out-of-order-1.png") |>
256
257
image_crop("3632x800")
257
258
```
258
259
259
-
```{r out-of-order-2, echo = FALSE, fig.cap = "Code that was written out of order, and was executed using the run button in a nonlinear error without error. The order of execution can be traced by following the numbers to the left of the code cells; their order indicates the order in which the cells were executed.", fig.retina = 2, out.width="100%"}
260
+
```{r out-of-order-2, echo = FALSE, fig.cap = "Code that was written out of order, and was executed using the run button in a nonlinear order without error. The order of execution can be traced by following the numbers to the left of the code cells; their order indicates the order in which the cells were executed.", fig.retina = 2, out.width="100%"}
0 commit comments