Skip to content

Commit 3333834

Browse files
committed
fixed figure size and whitespace issues in #334
1 parent 4074e01 commit 3333834

10 files changed

+12
-6
lines changed
153 KB
Loading
150 KB
Loading
249 KB
Loading
156 KB
Loading
156 KB
Loading

wrangling.Rmd

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ data set. There are 13 entities in the data set in total, corresponding to the
8282
13 rows in Figure \@ref(fig:02-obs).
8383

8484
``` {r 02-obs, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "A data frame storing data regarding the population of various regions in Canada. In this example data frame, the row that corresponds to the observation for the city of Vancouver is colored yellow, and the column that corresponds to the population variable is colored blue.", fig.retina = 2, out.width = "100%"}
85-
knitr::include_graphics("img/obs_and_var/obs_and_var.001.jpeg")
85+
image_read("img/data_frame_slides_cdn/data_frame_slides_cdn.004.jpeg") %>%
86+
image_crop("3632x700")
8687
```
8788

8889
Internally, R stores the columns of a data frame as either
@@ -92,7 +93,8 @@ Internally, R stores the columns of a data frame as either
9293
sections.
9394

9495
``` {r 02-vectors, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Data frame with three vectors.", fig.retina = 2, out.width = "100%"}
95-
knitr::include_graphics("img/vectors.jpeg")
96+
image_read("img/data_frame_slides_cdn/data_frame_slides_cdn.005.jpeg") %>%
97+
image_crop("3632x700")
9698
```
9799

98100
### What is a vector?
@@ -123,7 +125,8 @@ year
123125
> Vectors chapter of Advanced R [@wickham2019advanced].
124126
125127
``` {r 02-vector, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Example of a vector whose type is character.", fig.retina = 2, out.width = "100%"}
126-
knitr::include_graphics("img/vector/vector.001.jpeg")
128+
image_read("img/data_frame_slides_cdn/data_frame_slides_cdn.007.jpeg") %>%
129+
image_crop("3632x590")
127130
```
128131

129132
Table: (#tab:datatype-table) Basic data types in R
@@ -166,7 +169,8 @@ all elements are characters), whereas elements within a single list can be of
166169
different types (e.g., characters, integers, logicals, and even other lists).
167170

168171
``` {r 02-vec-vs-list, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "A vector versus a list.", fig.retina = 2, out.width = "100%"}
169-
knitr::include_graphics("img/vec_vs_list/vec_vs_list.001.jpeg")
172+
image_read("img/data_frame_slides_cdn/data_frame_slides_cdn.008.jpeg") %>%
173+
image_crop("3632x590")
170174
```
171175

172176
### What does this have to do with data frames?
@@ -186,7 +190,8 @@ It is generally much more common to use *vector* columns, though,
186190
as the values for a single variable are usually all of the same type.
187191

188192
``` {r 02-dataframe, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Data frame and vector types.", fig.retina = 2, out.width = "100%"}
189-
knitr::include_graphics("img/dataframe/dataframe.001.jpeg")
193+
image_read("img/data_frame_slides_cdn/data_frame_slides_cdn.009.jpeg") %>%
194+
image_crop("3632x700")
190195
```
191196

192197
The functions from the `tidyverse` package that we use often give us a
@@ -239,7 +244,8 @@ Figure \@ref(fig:02-tidy-image) demonstrates a tidy data set that satisfies thes
239244
three criteria.
240245

241246
``` {r 02-tidy-image, echo = FALSE, message = FALSE, warning = FALSE, fig.cap = "Tidy data satisfies three criteria.", fig.retina = 2, out.width = "100%"}
242-
knitr::include_graphics("img/tidy_data.jpeg")
247+
image_read("img/tidy_data.jpeg") %>%
248+
image_crop("3632x530")
243249
```
244250

245251
There are many good reasons for making sure your data are tidy as a first step in your analysis.

0 commit comments

Comments
 (0)