Learn R Programming

datamart (version 0.1.0)

query: Request data from data source

Description

This generic function is the main interface to the data behind the xdata layer. The first argument is the data object, the second argument is an identifier of the resource requested. For the end-user this is usually a character, but when building derived classes use resource("your_id") as signature. Query user timeline Query method for SPARQL end points Internal function, use query(dbpedia(), "Nuts1", ...) instead. Get the Raw data. Returns typical expenses by Coicop2 categories. Specification of income group and household type is possible. Return value either in percent (relative=TRUE, default) or in Euro. Plots expenditures by income group for a given category. Plots expenditures by income group for two categories.

Arguments

self
an Xdata object
resource
an identifier of the resource requested. End-user usually provide character, developer use resource and dispatch on the type.
...
additional parameter
self
a Twttr object
resource
an object of class User_timeline, usually created by query.xdata
user
twitter screenname, default self@user
since_id
character, only tweets with newer id, default NULL
count
numerical, maximum tweets, default NULL
verbose
logical, diagnostic messages? Default is getOption("verbose")
self
xsparql object
resource
SPARQL statement
opts
optional parameters as a list, see details
maxrows
optional (numeric, default=NULL) for limit the rows to fetch
interactive
optional (logical, default FALSE) asks for user input before fetching next rows
typeconv
optional (logical, default TRUE) to convert numbers and dates to R types
self
data object
resource
character describing the resource requested
verbose
if TRUE, diagnostic messages (default getOption("verbose"))
self
a InternalData object
resource
an object of class Raw, usually created by query.xdata
...
additional arguments, ignored.
self
data object
resource
Categories object identifying the resource requested
income
income level, default "(all)"
hhtype
household type, default "(all)"
relative
if TRUE (default), return percentages, otherwise Euro
...
other parameters, ignored
self
data object
resource
Elasticity object identifying the resource requested
categ
category for which to plot income elasticity.
...
other parameters, passed to beeswarm
self
data object
resource
Elasticities object identifying the resource requested
...
other parameters, passed to beeswarm

Value

  • a data.frame object a data.frame object vector vector vector

Details

Depending on the data object, additional parameter can be provided.