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.
intchron_extract(x, what)
List of IntChron records from intchron_request()
.
Element to extract: 'data_url', 'records', or 'file_data'.
what
from x
.
Other functions for interacting with the IntChron API:
intchron_crawl()
,
intchron_request()
,
intchron_tabulate()
,
intchron_url()
khiv <- intchron_request(intchron_url("record", c("oxa", "nrcf"), "Jordan", "Kharaneh IV"))
intchron_extract(khiv, "data_url")
#> $`record/oxa/Jordan/Kharaneh IV`
#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV"
#>
#> $`record/nrcf/Jordan/Kharaneh IV`
#> [1] "https://c14.arch.ox.ac.uk/database/public.php?record=Jordan/Kharaneh+IV"
#>