R/zzz_constants.R

Defines functions .onLoad

# nocov start

## Empty default objects to avoid repeated calls
.onLoad <- function(libname, pkgname) {
    ns <- asNamespace(pkgname)
    delayedAssign("EmptyColInfo", InstantiatedColumnInfo(),
                  assign.env = ns)
    delayedAssign("EmptyElTable", ElementaryTable(),
                  assign.env = ns)
    delayedAssign("empty_table", rtable(" "),
                  assign.env = ns)
    delayedAssign("EmptyRootSplit", RootSplit(),
                  assign.env = ns) ## is this used?
    delayedAssign("EmptyAllSplit", AllSplit(),
                  assign.env = ns) ## is this used?
    namespaceExport(ns, c("EmptyColInfo", "EmptyElTable"))
}

#' Empty table, column, split objects
#' @name EmptyColInfo
#' @aliases EmptyElTable EmptyRootSplit EmptyAllSplit
#' @description Empty objects of various types to compare against efficiently.
NULL

# nocov end

Try the rtables package in your browser

Any scripts or data that you put into this service are public.

rtables documentation built on Aug. 30, 2023, 5:07 p.m.