diff --git a/oreilly/base-R.html b/oreilly/base-R.html index 27cdbcf..eea74a3 100644 --- a/oreilly/base-R.html +++ b/oreilly/base-R.html @@ -342,7 +342,7 @@ str(l$a)

A photo of the glass pepper shaker containing just one packet of pepper.

-
pepper[1]pepper[1]
+
pepper[1]
@@ -350,7 +350,7 @@ str(l$a)

A photo of single packet of pepper.

-
pepper[[1]]pepper[[1]]
+
pepper[[1]]
diff --git a/oreilly/communicate-plots.html b/oreilly/communicate-plots.html index eb18d33..c239512 100644 --- a/oreilly/communicate-plots.html +++ b/oreilly/communicate-plots.html @@ -205,7 +205,7 @@ ggplot(mpg, aes(displ, hwy)) +

-
All nine combinations of hjust and vjust.hjust and vjust.
+
All nine combinations of hjust and vjust.
diff --git a/oreilly/data-tidy.html b/oreilly/data-tidy.html index 4978583..e48477c 100644 --- a/oreilly/data-tidy.html +++ b/oreilly/data-tidy.html @@ -440,7 +440,7 @@ Data and variable names in the column headers

A diagram that uses color to illustrate how the special ".value" sentinel works. The input has names "x_1", "x_2", "y_1", and "y_2", and we want to use the first component ("x", "y") as a variable name and the second ("1", "2") as the value for a new "id" column.

-
Pivoting with names_to = c(".value", "id") splits the column names into two components: the first part determines the output column name (x or y), and the second part determines the value of the id column.names_to = c(".value", "id") splits the column names into two components: the first part determines the output column name (x or y), and the second part determines the value of the id column.
+
Pivoting with names_to = c(".value", "id") splits the column names into two components: the first part determines the output column name (x or y), and the second part determines the value of the id column.
diff --git a/oreilly/data-visualize.html b/oreilly/data-visualize.html index 185e5a5..cacaf0a 100644 --- a/oreilly/data-visualize.html +++ b/oreilly/data-visualize.html @@ -178,7 +178,7 @@ ggplot(data = mpg) +

Mapping between shapes and the numbers that represent them: 0 - square, 1 - circle, 2 - triangle point up, 3 - plus, 4 - cross, 5 - diamond, 6 - triangle point down, 7 - square cross, 8 - star, 9 - diamond plus, 10 - circle plus, 11 - triangles up and down, 12 - square plus, 13 - circle cross, 14 - square and triangle down, 15 - filled square, 16 - filled circle, 17 - filled triangle point-up, 18 - filled diamond, 19 - solid circle, 20 - bullet (smaller circle), 21 - filled circle blue, 22 - filled square blue, 23 - filled diamond blue, 24 - filled triangle point-up blue, 25 - filled triangle point down blue.

-
R has 25 built in shapes that are identified by numbers. There are some seeming duplicates: for example, 0, 15, and 22 are all squares. The difference comes from the interaction of the color and fill aesthetics. The hollow shapes (0–14) have a border determined by color; the solid shapes (15–20) are filled with color; the filled shapes (21–24) have a border of color and are filled with fill.color and fill aesthetics. The hollow shapes (0–14) have a border determined by color; the solid shapes (15–20) are filled with color; the filled shapes (21–24) have a border of color and are filled with fill.
+
R has 25 built in shapes that are identified by numbers. There are some seeming duplicates: for example, 0, 15, and 22 are all squares. The difference comes from the interaction of the color and fill aesthetics. The hollow shapes (0–14) have a border determined by color; the solid shapes (15–20) are filled with color; the filled shapes (21–24) have a border of color and are filled with fill.
diff --git a/oreilly/joins.html b/oreilly/joins.html index cd0280a..0b17840 100644 --- a/oreilly/joins.html +++ b/oreilly/joins.html @@ -501,7 +501,7 @@ y <- tribble(

x and y are two data frames with 2 columns and 3 rows, with contents as described in the text. The values of the keys are coloured: 1 is green, 2 is purple, 3 is orange, and 4 is yellow.

-
Graphical representation of two simple tables. The coloured key columns map background colour to key value. The grey columns represent the “value” columns that are carried along for the ride.key columns map background colour to key value. The grey columns represent the “value” columns that are carried along for the ride.
+
Graphical representation of two simple tables. The coloured key columns map background colour to key value. The grey columns represent the “value” columns that are carried along for the ride.
@@ -519,7 +519,7 @@ y <- tribble(

x and y are placed at right-angles with lines forming a grid of potential matches. Keys 1 and 2 appear in both x and y, so we get a match, indicated by a dot. Each dot corresponds to a row in the output, so the resulting joined data frame has two rows.

-
An inner join matches each row in x to the row in y that has the same value of key. Each match becomes a row in the output.x to the row in y that has the same value of key. Each match becomes a row in the output.
+
An inner join matches each row in x to the row in y that has the same value of key. Each match becomes a row in the output.
@@ -530,7 +530,7 @@ y <- tribble(

Compared to the previous diagram showing an inner join, the y table gets a new virtual row containin NA that will match any row in x that didn't otherwise match. This means that the output now has three rows. For key = 3, which matches this virtual row, val_y takes value NA.

-
A visual representation of the left join where every row in x appears in the output.x appears in the output.
+
A visual representation of the left join where every row in x appears in the output.
@@ -541,7 +541,7 @@ y <- tribble(

Compared to the previous diagram showing an left join, the x table now gains a virtual row so that every row in y gets a match in x. val_x contains NA for the row in y that didn't match x.

-
A visual representation of the right join where every row of y appears in the output.y appears in the output.
+
A visual representation of the right join where every row of y appears in the output.
@@ -552,7 +552,7 @@ y <- tribble(

Now both x and y have a virtual row that always matches. The result has 4 rows: keys 1, 2, 3, and 4 with all values from val_x and val_y, however key 2, val_y and key 4, val_x are NAs since those keys don't have a match in the other data frames.

-
A visual representation of the full join where every row in x and y appears in the output.x and y appears in the output.
+
A visual representation of the full join where every row in x and y appears in the output.
@@ -575,7 +575,7 @@ Row matching

A join diagram where x has key values 1, 2, and 3, and y has key values 1, 2, 2. The output has three rows because key 1 matches one row, key 2 matches two rows, and key 3 matches zero rows.

-
The three ways a row in x can match. x1 matches one row in y, x2 matches two rows in y, x3 matches zero rows in y. Note that while there are three rows in x and three rows in the output, there isn’t a direct correspondence between the rows.x can match. x1 matches one row in y, x2 matches two rows in y, x3 matches zero rows in y. Note that while there are three rows in x and three rows in the output, there isn’t a direct correspondence between the rows.
+
The three ways a row in x can match. x1 matches one row in y, x2 matches two rows in y, x3 matches zero rows in y. Note that while there are three rows in x and three rows in the output, there isn’t a direct correspondence between the rows.
@@ -684,7 +684,7 @@ Filtering joins

A join diagram with old friends x and y. In a semi join, only the presence of a match matters so the output contains the same columns as x.

-
In a semi-join it only matters that there is a match; otherwise values in y don’t affect the output.y don’t affect the output.
+
In a semi-join it only matters that there is a match; otherwise values in y don’t affect the output.
@@ -692,7 +692,7 @@ Filtering joins

An anti-join is the inverse of a semi-join so matches are drawn with red lines indicating that they will be dropped from the output.

-
An anti-join is the inverse of a semi-join, dropping rows from x that have a match in y.x that have a match in y.
+
An anti-join is the inverse of a semi-join, dropping rows from x that have a match in y.
@@ -717,7 +717,7 @@ Non-equi joins

A join diagram showing an inner join betwen x and y. The result now includes four columns: key.x, val_x, key.y, and val_y. The values of key.x and key.y are identical, which is why we usually only show one.

-
An left join showing both x and y keys in the output.x and y keys in the output.
+
An left join showing both x and y keys in the output.
@@ -726,7 +726,7 @@ Non-equi joins

A join diagram illustrating join_by(key >= key). The first row of x matches one row of y and the second and thirds rows each match two rows. This means the output has five rows containing each of the following (key.x, key.y) pairs: (1, 1), (2, 1), (2, 2), (3, 1), (3, 2).

-
A non-equi join where the x key must greater than or equal to than the y key. Many rows generate multiple matches.x key must greater than or equal to than the y key. Many rows generate multiple matches.
+
A non-equi join where the x key must greater than or equal to than the y key. Many rows generate multiple matches.
@@ -749,7 +749,7 @@ Cross joins

A join diagram showing a dot for every combination of x and y.

-
A cross join matches each row in x with every row in y.x with every row in y.
+
A cross join matches each row in x with every row in y.
@@ -778,7 +778,7 @@ Inequality joins

-
An inequality join where x is joined to y on rows where the key of x is less than the key of y. This makes a triangular shape in the top-left corner.x is joined to y on rows where the key of x is less than the key of y. This makes a triangular shape in the top-left corner.
+
An inequality join where x is joined to y on rows where the key of x is less than the key of y. This makes a triangular shape in the top-left corner.
diff --git a/oreilly/logicals.html b/oreilly/logicals.html index 80379e6..782a969 100644 --- a/oreilly/logicals.html +++ b/oreilly/logicals.html @@ -253,7 +253,7 @@ Boolean algebra

Six Venn diagrams, each explaining a given logical operator. The circles (sets) in each of the Venn diagrams represent x and y. 1. y & !x is y but none of x; x & y is the intersection of x and y; x & !y is x but none of y; x is all of x none of y; xor(x, y) is everything except the intersection of x and y; y is all of y and none of x; and x | y is everything.

-
The complete set of boolean operations. x is the left-hand circle, y is the right-hand circle, and the shaded region show which parts each operator selects.x is the left-hand circle, y is the right-hand circle, and the shaded region show which parts each operator selects.
+
The complete set of boolean operations. x is the left-hand circle, y is the right-hand circle, and the shaded region show which parts each operator selects.
diff --git a/oreilly/numbers.html b/oreilly/numbers.html index df4f523..7d33abe 100644 --- a/oreilly/numbers.html +++ b/oreilly/numbers.html @@ -739,7 +739,7 @@ flights |>

The distribution of `dep_delay` is highly right skewed with a strong peak slightly less than 0. The 365 frequency polygons are mostly overlapping forming a thick black bland.

-
365 frequency polygons of dep_delay, one for each day. The frequency polygons appear to have the same shape, suggesting that it’s reasonable to compare days by looking at just a few summary statistics.dep_delay, one for each day. The frequency polygons appear to have the same shape, suggesting that it’s reasonable to compare days by looking at just a few summary statistics.
+
365 frequency polygons of dep_delay, one for each day. The frequency polygons appear to have the same shape, suggesting that it’s reasonable to compare days by looking at just a few summary statistics.
diff --git a/oreilly/rectangling.html b/oreilly/rectangling.html index 287d74e..177321c 100644 --- a/oreilly/rectangling.html +++ b/oreilly/rectangling.html @@ -150,7 +150,7 @@ str(x5)

Another screenshot, having expanded the grandchild of x4 to see its two children, again a double vector and a list.

-
You can repeat this operation as many times as needed to get to the data you’re interested in. Note the bottom-left corner: if you click an element of the list, RStudio will give you the subsetting code needed to access it, in this case x4[[2]][[2]][[2]].x4[[2]][[2]][[2]].
+
You can repeat this operation as many times as needed to get to the data you’re interested in. Note the bottom-left corner: if you click an element of the list, RStudio will give you the subsetting code needed to access it, in this case x4[[2]][[2]][[2]].
diff --git a/oreilly/workflow-pipes.html b/oreilly/workflow-pipes.html index d2ca1b3..112a049 100644 --- a/oreilly/workflow-pipes.html +++ b/oreilly/workflow-pipes.html @@ -11,7 +11,7 @@

Screenshot showing the "Use native pipe operator" option which can be found on the "Editing" panel of the "Code" options.

-
To insert |>, make sure the “Use native pipe operator” option is checked.|>, make sure the “Use native pipe operator” option is checked.
+
To insert |>, make sure the “Use native pipe operator” option is checked.