R/zzz.R

Defines functions .onAttach nptestStartupMessage

Documented in nptestStartupMessage

# Some code (for startup message) is re-purposed from the R package
# "mclust" (Scrucca et al., 2016) https://cran.r-project.org/package=mclust

nptestStartupMessage <- 
  function(){
    msg <- c(paste0("             _            _   
 _ __  _ __ | |_ ___  ___| |_ 
| '_ \\| '_ \\| __/ _ \\/ __| __|
| | | | |_) | ||  __/\\__ \\ |_ 
|_| |_| .__/ \\__\\___||___/\\__|
      |_|       version ", 
                    packageVersion("nptest"), "\n"),
             "\nType 'citation(\"nptest\")' to cite this package.\n")
    return(msg)
  }

.onAttach <- 
  function(lib, pkg){
    msg <- nptestStartupMessage()
    if(!interactive()) msg[1] <- paste("Package 'nptest' version", packageVersion("nptest"))
    packageStartupMessage(msg)
    invisible()
  }

Try the nptest package in your browser

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

nptest documentation built on April 15, 2023, 1:08 a.m.