Description Usage Arguments Author(s) References See Also
We can use R functions as part of Zorba queries by registering these R functions as external functions with the Zorba engine. We do this (in Zorba 1.0.0) by creating an external module and then associating it with a static context which is used in the evaluation of the Zorba query. The external module
We could have an external module that looks up the R object by name along the R search path (or within a particular R environment) and that does not require explicitly registering the functions by name. This is similar to RObjectTables.
1 2 3 4 5 6 7 8 | registerFunctions(module, factory = itemFactory(), ...,
.funcs = list(...),
.deterministic = rep(TRUE, length(.funcs)),
fix = length(names(.funcs)) == 0 || any(names(.funcs) == ""))
createModule(urn = "urn:R", ctxt = makeContext(zorba()), e = new.env(),
obj = new("RExternalModule"), register = !missing(ctxt))
getEnvironment(from, ...)
|
module |
the ExternalModule object in which these functions will be registered. |
factory |
the ItemFactory to use for the functions |
... |
the collection of functions specified individually in the call |
.funcs |
the collection of functions specified as a single list |
.deterministic |
a logical vector with as many elements as there
are functions being registered. A value of |
fix |
a logical value indicating whether the functions need to be processed to determine their names. |
from |
the ExternalModule whose environment is being requested. |
urn |
the namespace for these functions |
ctxt |
the zorba::StaticContext in which to register these functions |
e |
the environment to use for the ExternalModule to house the R functions. |
obj |
the object that will be filled in when creating the ExternalModule. |
register |
whether to register the module with the specified context. |
Duncan Temple Lang
XQuery http://www.w3.org/TR/xquery/
Zorba http://www.zorba-xquery.com/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.