R/zzz.R

Defines functions .onAttach .onLoad

.onLoad <- function(lib, pkg) {
       .C('setNThreads', n = as.integer(1L), PACKAGE = "HRTnomaly")
}

.onAttach <- function(lib, pkg) {
  if (.Call("isOmp", PACKAGE = "HRTnomaly")) {
    packageStartupMessage(sprintf("Package compiled with openMP (version released in %f.2)",
      .Call("openMP_version", PACKAGE = "HRTnomaly")))
  }
  else {
    packageStartupMessage("Package compiled without openMP.")
  }
  nn <- setCores()
  if (nn > 0L)
    packageStartupMessage("Use the function setCores() to change the number of CPU cores.")
}

Try the HRTnomaly package in your browser

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

HRTnomaly documentation built on April 3, 2025, 6:17 p.m.