R/zzz.R

Defines functions .onLoad

## Up until R 2.15.0, the require("methods") is needed but (now)
## triggers an warning from R CMD check
#.onLoad <- function(libname, pkgname){
#    #require("methods")  ## needed with R <= 2.15.0
#    loadRcppModules()
#}


## For R 2.15.1 and later this also works. Note that calling loadModule() triggers
## a load action, so this does not have to be placed in .onLoad() or evalqOnLoad().

#'@import methods Rcpp
#'@useDynLib glasp, .registration=TRUE

loadModule("Rcpp_glasp_export", TRUE)
#a <- function(){print('hello')}

.onLoad <- function(libname, pkgname){
  register_glasp_classification()
  register_glasp_regression()
  register_glasp_cox()
}
jlaria/glasp documentation built on Dec. 5, 2022, 6:42 a.m.