got_chars_json: Paths to Game of Thrones data as JSON and XML

Description Usage Value See Also Examples

View source: R/got_chars.R

Description

Paths to Game of Thrones data as JSON and XML

Usage

1
2
3

Value

Local path to JSON or XML file containing Game of Thrones data

See Also

Other Game of Thrones data and functions: got_chars

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
got_chars_json()
if (require("jsonlite")) {
  gotcj <- fromJSON(got_chars_json(), simplifyDataFrame = FALSE)
  identical(got_chars, gotcj)
}
got_chars_xml()
if (require("xml2")) {
  xml <- read_xml(got_chars_xml())
  xml
}

Example output

[1] "/usr/local/lib/R/site-library/repurrrsive/extdata/got_chars.json"
Loading required package: jsonlite
[1] TRUE
[1] "/usr/local/lib/R/site-library/repurrrsive/extdata/got_chars.xml"
Loading required package: xml2
{xml_document}
<root>
 [1] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1022</ur ...
 [2] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1052</ur ...
 [3] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1074</ur ...
 [4] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1109</ur ...
 [5] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1166</ur ...
 [6] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1267</ur ...
 [7] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1295</ur ...
 [8] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/130</url ...
 [9] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1303</ur ...
[10] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/1319</ur ...
[11] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/148</url ...
[12] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/149</url ...
[13] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/150</url ...
[14] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/168</url ...
[15] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/2066</ur ...
[16] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/208</url ...
[17] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/216</url ...
[18] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/232</url ...
[19] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/238</url ...
[20] <elem>\n  <url>https://www.anapioficeandfire.com/api/characters/339</url ...
...

repurrrsive documentation built on July 16, 2019, 1:02 a.m.