More work on O'Reilly book

* Make width narrower
* Convert deps to table
* Strip chapter status
This commit is contained in:
Hadley Wickham
2022-11-18 11:05:00 -06:00
parent 5895db09cd
commit 69b4597f3b
33 changed files with 784 additions and 1048 deletions

View File

@@ -14,12 +14,12 @@ Prerequisites</h2>
<p>This chapter focuses on ggplot2, one of the core packages in the tidyverse. To access the datasets, help pages, and functions used in this chapter, load the tidyverse by running this code:</p>
<div class="cell">
<pre data-type="programlisting" data-code-language="downlit">library(tidyverse)
#&gt; ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
#&gt; ── Attaching packages ──────────────────────────────────── tidyverse 1.3.2 ──
#&gt; ✔ ggplot2 3.4.0.9000 ✔ purrr 0.9000.0.9000
#&gt; ✔ tibble 3.1.8 ✔ dplyr 1.0.99.9000
#&gt; ✔ tidyr 1.2.1.9001 ✔ stringr 1.4.1.9000
#&gt; ✔ readr 2.1.3 ✔ forcats 0.5.2
#&gt; ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#&gt; ── Conflicts ─────────────────────────────────────── tidyverse_conflicts() ──
#&gt; ✖ dplyr::filter() masks stats::filter()
#&gt; ✖ dplyr::lag() masks stats::lag()</pre>
</div>
@@ -45,14 +45,14 @@ The<code>mpg</code> data frame</h2>
<div class="cell">
<pre data-type="programlisting" data-code-language="downlit">mpg
#&gt; # A tibble: 234 × 11
#&gt; manufacturer model displ year cyl trans drv cty hwy fl class
#&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt;
#&gt; 1 audi a4 1.8 1999 4 auto(l5) f 18 29 p compa
#&gt; 2 audi a4 1.8 1999 4 manual(m5) f 21 29 p compa
#&gt; 3 audi a4 2 2008 4 manual(m6) f 20 31 p compa
#&gt; 4 audi a4 2 2008 4 auto(av) f 21 30 p compa
#&gt; 5 audi a4 2.8 1999 6 auto(l5) f 16 26 p compa
#&gt; 6 audi a4 2.8 1999 6 manual(m5) f 18 26 p compa
#&gt; manufacturer model displ year cyl trans drv cty hwy fl class
#&gt; &lt;chr&gt; &lt;chr&gt; &lt;dbl&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt; &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;chr&gt;
#&gt; 1 audi a4 1.8 1999 4 auto(l5) f 18 29 p comp…
#&gt; 2 audi a4 1.8 1999 4 manual( f 21 29 p comp…
#&gt; 3 audi a4 2 2008 4 manual( f 20 31 p comp…
#&gt; 4 audi a4 2 2008 4 auto(av) f 21 30 p comp…
#&gt; 5 audi a4 2.8 1999 6 auto(l5) f 16 26 p comp…
#&gt; 6 audi a4 2.8 1999 6 manual( f 18 26 p comp…
#&gt; # … with 228 more rows</pre>
</div>
<p>Among the variables in <code>mpg</code> are:</p>