if (FALSE) { # interactive()
library(dplyr)
library(stringr)
gutenberg_subjects %>%
filter(subject_type == "lcsh") %>%
count(subject, sort = TRUE)
sherlock_holmes_subjects <- gutenberg_subjects %>%
filter(str_detect(subject, "Holmes, Sherlock"))
sherlock_holmes_subjects
sherlock_holmes_metadata <- gutenberg_works() %>%
filter(author == "Doyle, Arthur Conan") %>%
semi_join(sherlock_holmes_subjects, by = "gutenberg_id")
sherlock_holmes_metadata
# \donttest{
holmes_books <- gutenberg_download(sherlock_holmes_metadata$gutenberg_id)
holmes_books
# }
# date last updated
attr(gutenberg_subjects, "date_updated")
}
Run the code above in your browser using DataLab