intchron_extract: Extract an element from an IntChron record

View source: R/response.R

intchron_extractR Documentation

Extract an element from an IntChron record

Description

Requests to IntChron return JSON responses that are mapped to a complex nested list by jsonlite::fromJSON(). This convenience function provides access to specific named elements of those objects.

Usage

intchron_extract(x, what)

Arguments

x

List of IntChron records from intchron_request().

what

Element to extract: 'data_url', 'records', or 'file_data'.

Value

what from x.

See Also

Other functions for interacting with the IntChron API: intchron_crawl(), intchron_request(), intchron_tabulate(), intchron_url()

Examples

khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV"))
intchron_extract(khiv, "data_url")

joeroe/rintchron documentation built on July 30, 2023, 11:18 p.m.