Learn R Programming

datamart (version 0.4.2)

UrlData3-class: UrlData3 -- unified access to WWW resources

Description

This class provides the infrastructure to scrape the web with a Extract, Transform, Load (ETL) approach. Constructor for UrlData3 objects

Usage

urldata3(resource, template, extract.fct = readLines,
    transform.fct = identity, clss = "UrlData3", ...)

Arguments

resource
the name of the resource. Required.
template
a pattern for the url. Must contain 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.

Details

In most cases, it is not necessary to subclass UrlData. The slots can be set by the urldata function and allow to customize each step of the process.

Examples

Run this code
getSlots("UrlData3")

Run the code above in your browser using DataLab