Diff of /R/unix/zzz.R.in [beeb10] .. [3883ab]  Maximize  Restore

  Switch to side-by-side view

--- a/R/unix/zzz.R.in
+++ b/R/unix/zzz.R.in
@@ -1,17 +1,15 @@
 .onLoad <- function(lib, pkg)
 {
-    ## Load the rjags wrapper ...
+    ## Load the rjags wrapper.
     library.dynam("rjags", pkg, lib, local=FALSE)
-    packageStartupMessage("linking to JAGS ",
-                          .Call("get_version", PACKAGE="rjags"))
 
-    ## ... then the modules
+    ## Set the module directory
     moddir <- "@JAGS_MODULES@"
     if (is.null(getOption("jags.moddir"))) {
         options("jags.moddir" = moddir)
     }
-    load.module("basemod")
-    load.module("bugs")
+    load.module("basemod", quiet=TRUE)
+    load.module("bugs", quiet=TRUE)
 
     ## Set progress bar type
     if (is.null(getOption("jags.pb"))) {
@@ -19,7 +17,16 @@
     }
 }
 
+.onAttach <- function(lib, pkg)
+{
+    packageStartupMessage("Linked to JAGS ",
+                          .Call("get_version", PACKAGE="rjags"))
+    packageStartupMessage("Loaded modules: ",
+                          paste(list.modules(), collapse=","))
+}
+
 .onUnload <- function(libpath)
 {
     library.dynam.unload("rjags", libpath)
 }
+

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks