R-beta: autoloading a required library

Albrecht Gebhardt (agebhard@zidsrv.sci.uni-klu.ac.at)
Mon, 17 Nov 1997 01:28:46 +0100 (CET)


Date: Mon, 17 Nov 1997 01:28:46 +0100 (CET)
From: Albrecht Gebhardt <agebhard@zidsrv.sci.uni-klu.ac.at>
To: r-help@stat.math.ethz.ch
Subject: R-beta: autoloading a required library


I wanted to use the dist() function from the mva library in my own
library, so I put require(mva) in my files. When my library loads, a
message about "Autoloading ... mva" appears. But when I call dist() now
within my functions the message

Error in .C("dist", as.double(x), nrow(x), ncol(x), double(len),
as.integer(method)) : C/Fortran function not in load table 

appears.

After dyn.load("..._path_to_/mva.so") it works.

Is there something wrong with the autoloading process or should 
statements like `if (!is.loaded("dist")) {dynload("mva.so")}` be added to 
the functions of the mva library? Or is this problem due to a wrong setup
in my R (0.50a4)? 


Albrecht

------------------------------------------------------------------
Albrecht Gebhardt           email: albrecht.gebhardt@uni-klu.ac.at
Institut fuer Mathematik    Tel. : (++43 463) 2700/837
Universitaet Klagenfurt     Fax  : (++43 463) 2700/834
Villacher Str. 161
A-9020 Klagenfurt, Austria
------------------------------------------------------------------





=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=