jst_get_chapters {jstor} | R Documentation |
Extract information on book chapters
Description
jst_get_chapters()
extracts meta-data from JSTOR-XML files for book
chapters.
Usage
jst_get_chapters(file_path, authors = FALSE)
Arguments
file_path |
The path to a |
authors |
Extracting the authors is an expensive operation which makes
the function ~3 times slower, depending on the number of chapters and
the number of authors. Defaults to |
Details
Currently, jst_get_chapters()
is quite a lot slower than most of the other
functions. It is roughly 10 times slower than jst_get_book
, depending on
the number of chapters to extract.
Value
A tibble
containing the extracted meta-data with the following
columns:
book_id (chr): The book id of type "jstor", which is not a registered DOI.
file_name (chr): The filename of the original .xml-file. Can be used for joining with other data for the same file.
part_id (chr): The id of the part.
part_label (chr): A label for the part, if specified.
part_title (chr): The title of the part.
part_subtitle (chr): The subtitle of the part, if specified.
authors (list): A list-column with information on the authors. Can be unnested with
tidyr::unnest()
. See the examples andjst_get_authors()
.abstract (chr): The abstract to the part.
part_first_page (chr): The page where the part begins.
Examples
# extract parts without authors
jst_get_chapters(jst_example("book.xml"))
# import authors too
parts <- jst_get_chapters(jst_example("book.xml"), authors = TRUE)
parts
tidyr::unnest(parts)