R-beta: Not loading C library

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Tue, 31 Mar 1998 09:31:07 +0200


>>>>> "PaulG" == Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:

    >> I try sourcing test.R from the 'class' package, I get this error:
    >> EError in .C("VR_knn1", as.integer(ntr), as.integer(nte),
    >> as.integer(p), : C/Fortran function not in load table

    PaulG> I haven't used this package but you should be using
    PaulG> library("class") rather than source to get class.so loaded. Also
    PaulG> beware, (R-devel: I HOPE THIS SIMPLE BUG IS FIXED IN NEW
    PaulG> RELEASES OF R BECAUSE IT HAS THE POTENTIAL TO CAUSE A LOT OF
    PaulG> UNNECESSARY PROBLEMS)

You mean, "source(..)" instead of  "library(..)" ?

 ``No way!''

1) Packages (formerly know as "libraries") are attached to a different
   place on the search() list,  whereas  source(.) would mix the package
   objects with your own objects.
   Nobody should encourage this.

2) Packages may load compiled code (see below) which is done using
   library.dynam (in 0.61.x) or rather
   library.dynam WITHIN a .First.lib function (from 0.62.0 on).

    PaulG> there was a message once on r-devel about
    PaulG> a bug in library.dynam which may be causing the problem. I've
    PaulG> lost the message, but as I recall, if you save your workspace
    PaulG> when you q() (ie. create the .RData file) then when R starts it
    PaulG> reloads a variable .Dyn.libs which indicates libraries which
    PaulG> have been loaded (even though they are not yet loaded in the new
    PaulG> session). I think if you rm(.Dyn.libs) before you do
    PaulG> library("class") then it may work.

You are correct, Paul.
However, this bug was fixed ``from 0.61.1 to 0.61.2''.
As was said by our release master, Peter Dalgaard, 
0.61.2 has been a bug fix release where we have been careful not to
introduce any new bugs (and for that reason did not include 
several nice new features of the development version).

Martin.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._