Learn R Programming

datamart (version 0.3.2)

resource: Generate Resource classes on the fly

Description

This function takes a character as input. If no class with this name exists, the function calls setClass and creates one, derived from Resource. The function returns its input, i.e. its use lies in its side effect.

Usage

resource(id, verbose = getOption("verbose"))

Arguments

id
character, identifier of the resource
verbose
if TRUE, diagnostic messages. Defaults to getOption("verbose").

Details

The function is useful for defining query methods for data classes derived from xdata. It enables dispatching on the signature, which is the main reason for the function.