select_passage | R Documentation |
Retrieves a whole book(s), passage from a book or a portion of a book or chapter, based on specified criteria such as book, chapter, verse, or alternative selection using author, section, or date.
select_passage(
book = NULL,
chapter = NULL,
verse = NULL,
fraction = 1,
part = 1,
by = NULL,
divider = NULL,
language = "English",
testament = NULL
)
book |
A character vector specifying the book name(s) from which to select the passage.
Ignored if the |
chapter |
A numeric vector indicating the chapter(s) of the book. If selection by section, author or date is used, the chapter must be set to NULL. |
verse |
A numeric vector indicating the verse(s) within the chapter. |
fraction |
A numeric value (default |
part |
A numeric value specifying which part to return (must be between 1 and |
by |
An optional character string for alternative selection criteria. It should be one of
|
divider |
A character vector specifying the author, section or date range to be selected. |
language |
A character string indicating the language of the passage. Must be one of
|
testament |
A character string specifying the testament. Must be one of
|
This function validates the input parameters and determines the book(s) to be used based on the provided criteria.
If the by
argument is given, the function leverages helper functions such as by_author()
,
by_section()
, or by_date()
to select the appropriate book(s) based on the alternative criterion.
The passage is then retrieved via retrieve_chapter()
, applying verse filtering and partitioning based on
the fraction
and part
arguments.
Returns the selected passage as generated by the retrieve_chapter()
function.
# Example 1: Select a passage by specifying book, chapter, and verse.
select_passage(book = "Genesis", chapter = 1, verse = 1, testament = "Old")
select_passage(book = "Mat", chapter = 1, verse = 1:10, testament = "new")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.