Description Usage Arguments Value Examples
Vectorized form of get_chapter. Download multiple chapters from a single book or multple books of your specification. Can partially download books, and can mix and match books.
1 | get_chapters(book, chapter)
|
book |
name of book or vector of book names |
chapter |
name or number of chapter, or vector of chapters |
Returns a dataframe with 4 columns: text, book, chapter name in English, & chapter name in Chinese. In the case for the dao-de-jing, only book arg is needed. If you reach the API call limit or the connection has an error, function will retry 3 times. If still unsuccessful, an NA value will be returned in the "text" column.
1 2 3 4 5 6 7 8 9 | most basic use is to call a book and a chapter
get_chapters("analects", "xue-er")
get_chapters("analects", 1)
Can accept multiple chapters in a book, e.g.
get_chapters("analects", c("xue-er", "wei-zheng"))
get_chapters("analects", 1:2)
can specify multiple books and chapters
get_chapters(c("analects", "mengzi"), c("xue-er", "liang-hui-wang-i"))
get_chapters(c("analects", "mengzi", 1:2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.