Running examples in ‘gutenbergr-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: gutenberg_metadata
> ### Title: Gutenberg metadata about each work
> ### Aliases: gutenberg_metadata
> ### Keywords: datasets
> 
> ### ** Examples
> 
> 
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> library(stringr)
> 
> gutenberg_metadata
# A tibble: 51,997 x 8
   gutenberg_id title author gutenberg_autho… language gutenberg_books… rights
          <int> <chr> <chr>             <int> <chr>    <chr>            <chr> 
 1            0  <NA> <NA>                 NA en       <NA>             Publi…
 2            1 "The… Jeffe…             1638 en       United States L… Publi…
 3            2 "The… Unite…                1 en       American Revolu… Publi…
 4            3 "Joh… Kenne…             1666 en       <NA>             Publi…
 5            4 "Lin… Linco…                3 en       US Civil War     Publi…
 6            5 "The… Unite…                1 en       American Revolu… Publi…
 7            6 "Giv… Henry…                4 en       American Revolu… Publi…
 8            7 "The… <NA>                 NA en       <NA>             Publi…
 9            8 "Abr… Linco…                3 en       US Civil War     Publi…
10            9 "Abr… Linco…                3 en       US Civil War     Publi…
# … with 51,987 more rows, and 1 more variable: has_text <lgl>
> 
> gutenberg_metadata %>%
+   count(author, sort = TRUE)
# A tibble: 16,190 x 2
   author                                  n
   <chr>                               <int>
 1 <NA>                                 3457
 2 Various                              3199
 3 Anonymous                             724
 4 Shakespeare, William                  317
 5 Lytton, Edward Bulwer Lytton, Baron   219
 6 Twain, Mark                           214
 7 Ebers, Georg                          171
 8 Dickens, Charles                      163
 9 Verne, Jules                          151
10 Unknown                               141
# … with 16,180 more rows
> 
> # look for Shakespeare, excluding collections (containing "Works") and translations
> shakespeare_metadata <- gutenberg_metadata %>%
+   filter(author == "Shakespeare, William",
+          language == "en",
+          !str_detect(title, "Works"),
+          has_text,
+          !str_detect(rights, "Copyright")) %>%
+          distinct(title)
> 
> ## Not run: 
> ##D shakespeare_works <- gutenberg_download(shakespeare_metadata$gutenberg_id)
> ## End(Not run)
> 
> # note that the gutenberg_works() function filters for English
> # non-copyrighted works and does de-duplication by default:
> 
> shakespeare_metadata2 <- gutenberg_works(author == "Shakespeare, William",
+                                          !str_detect(title, "Works"))
Warning: `filter_()` is deprecated as of dplyr 0.7.0.
Please use `filter()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated.
Error in loadNamespace(name) : there is no package called ‘tidyr’
Calls: gutenberg_works ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted