read_sdmx | R Documentation |
read SDMX data into R as dataframes
read_sdmx(path, destfile = tempfile(fileext = ".xml"), quiet = TRUE,
method = "libcurl", mode = "w", ...)
path |
Character; the path to an SDMX-ML xml file |
destfile |
a character string (or vector, see |
quiet |
If |
method |
Method to be used for downloading files. Current
download methods are The method can also be set through the option
|
mode |
character. The mode with which to write the file. Useful
values are |
... |
allow additional arguments to be passed, unused. |
read_sdmx returns a dataframe with the SDMX data 'as-is' which means that all columns will be character vectors. The base R function 'download.file' is used when a url is provided to read_sdmx.
data.frame object
f <- system.file("extdata/compact_2.0.xml", package = "readsdmx")
d <- readsdmx::read_sdmx(f)
u <-
"https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/HH_DASH/..Q/all?format=compact_v2"
d <- readsdmx::read_sdmx(u)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.