Learn R Programming

qtbase (version 1.1.0)

qlibrary: Populate a library object

Description

This function is only for use by packages that provide a library to R. It should be called in the .onLoad function of the package.

Usage

qlibrary(lib, namespace = deparse(substitute(lib)), register = TRUE)

Arguments

lib
An environment object that exists in the namespace of the package. The name of the object in the calling frame must match the name of the module in Smoke, unless the name attribute is set.
namespace
If not NULL, the implicit top-level namespace of the library. Many libraries have a top-level namespace, which usually should be ignored (implied) for convenience. Note that this is not the case for Qt, even though it does place many enumerations inside the Qt namespace.
register
Whether to register the library in the global list.

Value

  • The library object, but catching the return value is useless, since, as an environment, it was modified by reference.

See Also

The vignette, once it exists, for creating packages based on qtbase

Examples

Run this code
## regenerate the Qt library object
Qt <- new.env()
qlibrary(Qt, NULL)

Run the code above in your browser using DataLab