get_chapter: get_chapter - Download a single chapter from ctext.org

Description Usage Arguments Value Examples

View source: R/get_text.R

Description

Unvectorized function. Used as a building block for get_chapters and get_books.

Usage

1
get_chapter(book, chapter = NA)

Arguments

book

name of book

chapter

name or number of chapter in book

Value

Returns a dataframe with 4 columns: text, book, chapter name in English, & chapter name in Chinese. In the case for the dao-de-jing, chapter param not 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.

Examples

1
2
3
get_chapter("analects", "xue-er")
get_chapter("analects", 1)
get_chapter("dao-de-jing")

Jjohn987/ctextclassics documentation built on May 20, 2019, 3:05 p.m.