[R] liblapack

Giuseppe neox86 at gmail.com
Fri Jan 29 13:50:41 CET 2010


Dear all,

I am trying to put together in a package some functions that maybe of
interest to other. A particular function of the package uses "zgges"
from Lapack with a .Fortran call. Since R does not load all symbols
from liblapack, I load all the liblapack symbols (lazyload, it is)
with a .First.lib hook in the zzz.R file:

.First.lib <- function(lib, pkg)
       dyn.load("/usr/lib/liblapack.dylib", now = FALSE).

This is ok for my system (OSX 10.6), but it won't work on Linux and
Windows. Of course, it won't work if the location of liblapack is
different from /usr/lib. Is there a way load liblapack conditionally
on the specific system and the location of the library?

Thank you in advance.



More information about the R-help mailing list