R: Fetch data in long form as a data.frame from a DataMarket...
dmlist
R Documentation
Fetch data in long form as a data.frame from a DataMarket dataset.
Description
This performs a list API request at DataMarket.com, fetching the
requested data and wrapping it in a data.frame object.
Usage
dmlist(ds, .params = list(), ...)
Arguments
ds
a dataset ID, DS string, URL query-string, or whole URL. The DS
string to send is extracted from the URL as needed, and short URLs
at data.is, bit.ly, is.gd, t.co and url.is are expanded.
.params
extra GET parameters to pass along in the API request.
...
named parameters whose names are dimension titles or IDs, and
whose values are titles or IDs of values of those dimensions.
E.g. if dataset 17tm has a dimension named Country, then
dmlist("17tm", Country="Algeria") filters on that
dimension. If the dimension name includes spaces, it needs to be
quoted: dmlist("12rb", "Country or Area"="Afghanistan")
Value
a data frame representing the fetched data. The data frame has one
column for each of the dataset's dimensions, containing a factor
whose levels are values of that dimension, and a 'Value' column
holding a numerical value for each combination of dimension values.