More minor page count tweaks & fixes

And re-convert with latest htmlbook
This commit is contained in:
Hadley Wickham
2023-01-26 10:36:07 -06:00
parent d9afa135fc
commit aa9d72a7c6
38 changed files with 838 additions and 1093 deletions

View File

@@ -57,7 +57,7 @@ Python, Julia, and friends</h2>
</section>
</section>
<section id="prerequisites" data-type="sect1">
<section id="intro-prerequisites" data-type="sect1">
<h1>
Prerequisites</h1>
<p>Weve made a few assumptions about what you already know to get the most out of this book. You should be generally numerically literate, and its helpful if you have some programming experience already. If youve never programmed before, you might find <a href="https://rstudio-education.github.io/hopr/">Hands on Programming with R</a> by Garrett to be a valuable adjunct to this book.</p>
@@ -99,16 +99,16 @@ The tidyverse</h2>
<pre data-type="programlisting" data-code-language="r">library(tidyverse)
#&gt; ── Attaching core tidyverse packages ──────────────── tidyverse 1.3.2.9000 ──
#&gt; ✔ dplyr 1.0.99.9000 ✔ readr 2.1.3
#&gt; ✔ forcats 0.5.2.9000 ✔ stringr 1.5.0.9000
#&gt; ✔ forcats 0.5.2 ✔ stringr 1.5.0
#&gt; ✔ ggplot2 3.4.0.9000 ✔ tibble 3.1.8
#&gt; ✔ lubridate 1.9.0 ✔ tidyr 1.2.1.9001
#&gt; ✔ lubridate 1.9.0 ✔ tidyr 1.3.0
#&gt; ✔ purrr 1.0.1
#&gt; ── Conflicts ─────────────────────────────────────── tidyverse_conflicts() ──
#&gt; ✖ dplyr::filter() masks stats::filter()
#&gt; ✖ dplyr::lag() masks stats::lag()
#&gt; Use the ]8;;http://conflicted.r-lib.org/conflicted package]8;; to force all conflicts to become errors</pre>
#&gt; Use the conflicted package (&lt;http://conflicted.r-lib.org/&gt;) to force all conflicts to become errors</pre>
</div>
<p>This tells you that tidyverse loads eight packages: ggplot2, tibble, tidyr, readr, purrr, dplyr, stringr, and forcats. These are considered the <strong>core</strong> of the tidyverse because youll use them in almost every analysis.</p>
<p>This tells you that tidyverse loads nine packages: dplyr, forcats, ggplot2, lubridate, purrr, readr, stringr, tibble, tidyr. These are considered the <strong>core</strong> of the tidyverse because youll use them in almost every analysis.</p>
<p>Packages in the tidyverse change fairly frequently. You can check whether updates are available and optionally install them by running <code><a href="https://tidyverse.tidyverse.org/reference/tidyverse_update.html">tidyverse_update()</a></code>.</p>
</section>
@@ -116,11 +116,16 @@ The tidyverse</h2>
<h2>
Other packages</h2>
<p>There are many other excellent packages that are not part of the tidyverse because they solve problems in a different domain or are designed with a different set of underlying principles. This doesnt make them better or worse, just different. In other words, the complement to the tidyverse is not the messyverse but many other universes of interrelated packages. As you tackle more data science projects with R, youll learn new packages and new ways of thinking about data.</p>
<p>In this book, well use five data packages from outside the tidyverse:</p>
<p>Well use many packages from outside the tidyverse in this book. For example, we use the following four data packages to provide interesting applications:</p>
<div class="cell">
<pre data-type="programlisting" data-code-language="r">install.packages(c("gapminder", "Lahman", "nycflights13", "palmerpenguins", "wakefield"))</pre>
<pre data-type="programlisting" data-code-language="r">install.packages(c("babynames", "gapminder", "nycflights13", "palmerpenguins"))</pre>
</div>
<p>These packages provide data on world development, baseball, airline flights, and body measurements of penguins that well use to illustrate key data science ideas, while the final one helps generate random data sets.</p>
<p>Well also use a selection of other packages for one off examples. You dont need to install them now, just remember that whenever you see an error like this:</p>
<div class="cell">
<pre data-type="programlisting" data-code-language="r">library(ggrepel)
#&gt; Error in library(ggrepel) : there is no package called ggrepel</pre>
</div>
<p>You need to run <code>install.packages("ggrepel")</code> to install the package.</p>
</section>
</section>
@@ -177,17 +182,17 @@ Colophon</h1>
<td style="text-align: left;">1.1.0.9000</td>
<td style="text-align: left;">local</td>
</tr><tr class="even"><td style="text-align: left;">dbplyr</td>
<td style="text-align: left;">2.2.1.9000</td>
<td style="text-align: left;">2.3.0.9000</td>
<td style="text-align: left;">local</td>
</tr><tr class="odd"><td style="text-align: left;">dplyr</td>
<td style="text-align: left;">1.0.99.9000</td>
<td style="text-align: left;">Github (tidyverse/dplyr@f4bece54fb56e10d7ae6a3bb27f2afedd65683ca)</td>
<td style="text-align: left;">Github (tidyverse/dplyr@6a1d46965a0f3ac180456e16bbe004755ec8488e)</td>
</tr><tr class="even"><td style="text-align: left;">dtplyr</td>
<td style="text-align: left;">1.2.2</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="odd"><td style="text-align: left;">forcats</td>
<td style="text-align: left;">0.5.2.9000</td>
<td style="text-align: left;">local</td>
<td style="text-align: left;">0.5.2</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="even"><td style="text-align: left;">ggplot2</td>
<td style="text-align: left;">3.4.0.9000</td>
<td style="text-align: left;">Github (tidyverse/ggplot2@4fea51b1eb2cdacebeacf425627dcbc1d61a5d3e)</td>
@@ -246,14 +251,14 @@ Colophon</h1>
<td style="text-align: left;">1.0.3</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="odd"><td style="text-align: left;">stringr</td>
<td style="text-align: left;">1.5.0.9000</td>
<td style="text-align: left;">Github (tidyverse/stringr@e4601f7fdb125faafbd028cb9e32d23ef2d1efed)</td>
<td style="text-align: left;">1.5.0</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="even"><td style="text-align: left;">tibble</td>
<td style="text-align: left;">3.1.8</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="odd"><td style="text-align: left;">tidyr</td>
<td style="text-align: left;">1.2.1.9001</td>
<td style="text-align: left;">local</td>
<td style="text-align: left;">1.3.0</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr><tr class="even"><td style="text-align: left;">tidyverse</td>
<td style="text-align: left;">1.3.2.9000</td>
<td style="text-align: left;">Github (tidyverse/tidyverse@aeabcde8c6ae435f16b5173682d5667d292829fb)</td>
@@ -261,9 +266,6 @@ Colophon</h1>
<td style="text-align: left;">1.3.3</td>
<td style="text-align: left;">CRAN (R 4.2.0)</td>
</tr></tbody></table></div>
<div class="cell">
<pre data-type="programlisting" data-code-language="r">cli:::ruler()</pre>
</div>
</section>