fromJSONstat {rjstat} | R Documentation |
Convert JSON-stat format to data frame(s)
Description
This function takes a JSON-stat format response and returns a data frame or a
list of data frames, with columns for each dimension and one value
column.
Usage
fromJSONstat(x, naming = "label", use_factors = FALSE, silent = FALSE)
Arguments
x |
JSON-stat format response, or path or URL to such a response |
naming |
whether to use (longer) |
use_factors |
whether dimension categories should be factors or character objects |
silent |
suppress warnings |
Value
For responses with class dataset
: A data frame. For responses
with class collection
: An unnamed list of one or more lists or data
frames. For responses with class bundle
: A named list of one or more
data frames.
Examples
## Not run:
oecd.canada.url <- "https://json-stat.org/samples/oecd-canada.json"
results <- fromJSONstat(oecd.canada.url)
names(results)
## End(Not run)
[Package rjstat version 0.4.3 Index]