urldata: Constructor for UrlData objects

Description Usage Arguments

Description

This function creates a web resource. As this, it allows to map an Web API into an R S4 class.

Usage

1
2
urldata(resource, template, extract.fct = readLines,
  transform.fct = identity, clss = "UrlData", ...)

Arguments

resource

the name of the resource. Required.

template

a pattern for the url. Must contain %s for substitution. Required.

extract.fct

a function that takes an URI and returns the raw data. Default readLines.

transform.fct

a function that takes the raw data and returns the cleaned/transformed data. Default identity.

clss

name of the class to create. Default UrlData, must be inherited from this class.

...

parameters for the query. Must be named arguments, values can be characters (for defaults), NULL, or functions.


datamart documentation built on May 2, 2019, 9:40 a.m.