This function creates a web resource. As this, it allows to map an Web API into an R S4 class.
1 2 |
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.