epubr (version 0.6.0)

epub_head: Preview the first n characters

Description

Preview the first n characters of each EPUB e-book section.

Usage

epub_head(x, n = 50)

Arguments

x

a data frame returned by epub or a character string giving the EPUB filename(s).

n

integer, first n characters to retain from each e-book section.

Value

a data frame.

Details

This function returns a simplified data frame of only the unnested section and text columns of a data frame returned by epub, with the text included only up to the first n characters. This is useful for previewing the opening text of each e-book section to inspect for possible useful regular expression patterns to use for text-based section identification. For example, an e-book may not have meaningful section IDs that distinguish one type of book section from another, such as chapters from non-chapter sections, but the text itself may contain this information at or near the start of a section.

See Also

epub_cat

Examples

Run this code
# NOT RUN {
file <- system.file("dracula.epub", package = "epubr")
epub_head(file)
# }

Run the code above in your browser using DataLab