R/zzz.R

Defines functions .onAttach .onLoad .onUnload

.onUnload <- function(libpath) {
  # Force finalize() on Matlab objects
  gc()
}

.onLoad <- function(libname, pkgname) {
  ns <- getNamespace(pkgname)
  pkg <- Package(pkgname)
  assign(pkgname, pkg, envir = ns)
}

.onAttach <- function(libname, pkgname) {
  pkg <- get(pkgname, envir = getNamespace(pkgname))
  startupMessage(pkg)
}

Try the R.matlab package in your browser

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

R.matlab documentation built on Aug. 26, 2022, 1:07 a.m.