get_perseus_text: Get a primary text by URN.

Description Usage Arguments Value Examples

View source: R/get_perseus_text.R

Description

Get a primary text by URN.

Usage

1
get_perseus_text(urn, excerpt = NULL)

Arguments

urn

Valid uniform resource number (URN) obtained from perseus_catalog.

excerpt

An index to excerpt the text. For example, the first four "verses" of a text might be 1.1-1.4. If NULL, the entire work is returned.

Value

A seven column tbl_df with one row for each "section" (splits vary from text–could be line, chapter, etc.). Columns:

text

character vector of text

urn

Uniform Resource Number

group_name

Could refer to author (e.g. "Aristotle") or corpus (e.g. "New Testament")

label

Text label, e.g. "Phaedrus"

description

Text description

language

Text language, e.g. "grc" = Greek, "lat" = Latin, "eng" = English

section

Text section or excerpt if specified

Examples

1
2
3
get_perseus_text("urn:cts:greekLit:tlg0013.tlg028.perseus-grc2")
get_perseus_text("urn:cts:latinLit:stoa0215b.stoa003.opp-lat1")
get_perseus_text(urn = "urn:cts:greekLit:tlg0031.tlg009.perseus-grc2", excerpt = "5.1-5.5")

daranzolin/rperseus documentation built on Dec. 10, 2019, 8:24 a.m.