Extracts a specified fraction of a chapter from a given book or a portion of a book.
get_fraction(book, chapter, fraction, part, language = NULL, testament = NULL)
A character vector containing the verses from the specified section of the chapter.
A character string or vector specifying the book(s) from which the chapter is retrieved.
A numeric vector indicating the chapter number(s) to be processed.
A numeric value representing the total number of sections into which the chapter should be divided. Must be an integer greater than or equal to 1.
A numeric value indicating which section of the divided chapter to return.
Must satisfy 1 <= part <= fraction
.
An optional character string indicating the language of the Bible.
Typically one of "English"
, "Hebrew"
, or "Greek"
. Default is NULL
.
An optional character string specifying the testament.
Should be "Old Testament"
, "New Testament"
, or "Both"
. Default is NULL
.
This function validates the fraction
and part
parameters, retrieves the full chapter text using
retrieve_chapter()
, and calculates the corresponding section of the chapter to return. The chapter is divided
into equal parts based on the number of verses, and the function extracts the verses corresponding to the requested part.