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 .xml-file for a book or research report.

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 FALSE. Use authors = TRUE to import the authors too.

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:

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)

[Package jstor version 0.3.11 Index]