R/zzz.R

Defines functions onAttach onLoad

.onLoad <- function(lib, pkg){
  if("package:FNTDclassic"%in%search()){
    stop("You cannot run the 'FNTD' and 'FNTDclassic' packages at the same time!")
  }
 .jpackage(pkg, lib.loc = lib)
}

.onAttach <- function(lib, pkg){
  if("package:FNTDclassic"%in%search()){
    stop("You cannot run the 'FNTD' and 'FNTDclassic' packages at the same time!")
  }
  .jpackage(pkg, lib.loc = lib)
  packageStartupMessage( "FTND package loaded, version ",
                         packageDescription("FNTD")$Version,
                         " as of ",
                         packageDescription("FNTD")$Date,
                         " using FNTD.jar ",
                         .jcall(.jnew("fntd/About"), "S", "getBuildInfo"), "\n",
                         .jcall(.jnew("fntd/Test"), "S", "message"), "\n",
                         "In case you experiencing memory troubles, increase your java heap space by \"options(java.parameters=\"-Xmx6000m\")\" (exchanging \"6000m\" = 6GB with your memory requirement).\n\n",
                         "Access help by typing \"?FNTD\" and demos by \"demo(package = \'FNTD\')\".")
}
FNTD/R-package documentation built on Oct. 18, 2017, 12:59 p.m.