a question about sgeostat
On Tue, 30 May 2000, Prof Brian D Ripley wrote:
Matthew had already said that re-installing solved this for him. On Tue, 30 May 2000, Albrecht Gebhardt wrote:
I just tried installing tripack on RedHat 6.2 (gcc 2.95.2) into a private R_LIBS dir, the same thing:
library(tripack,lib.loc="~/R-Lib-x86")
Error in library.dynam("tripack") : dynamic library `tripack' not found
But
library.dynam("tripack",lib.loc="~/R-Lib-x86")
works and after rm(.lib.loc) and setting R_LIBS to "~/R-Lib-x86" it works without errors via
library(tripack)
So I guess you may also have some trouble with your R_LIBS variable?
Currently I'm doing a
.First.lib <- function(lib, pkg) library.dynam("tripack", pkg, lib)
in the tripack package. I think I have to modify it so that it works also
if called via library(tripack, lib.loc="path/to/somewhere"), any hints?
See below.
Or is there an error in the library() function not passing its lib.loc argument to subsequent calls?
It's your error. You have (version 1.0-3)
First.lib <- function(lib, pkg) library.dynam("tripack", pkg, lib)
if(version$minor < "62") library.dynam("tripack")
You fail to test for version$major!
That the error message you got is not mentioning the other two arguments
was a useful hint.
Now I have stolen
.First.lib <- function(lib, pkg) {
if(version$major==0 && version$minor < 62)
stop("This version for R 0.62 or later")
library.dynam("tripack", pkg, lib)
provide(tripack)
}
from library(spatial) and library(tripack,lib.loc="path/to/somewhere")
works now.
Thanks for the hint.
But help() still does not find anything about the library in
"path/to/somewhere", even if I pass lib.loc="path/to/somewhere" to help.
Is still something wrong with my .First.lib function?
Albrecht
......................................................................
| Albrecht Gebhardt Tel.: (++43 463) 2700/832 |
| Institut fuer Mathematik Fax : (++43 463) 2700/834 |
| Universitaet Klagenfurt mailto:albrecht.gebhardt at uni-klu.ac.at |
| Villacher Str. 161 http://www-stat.uni-klu.ac.at/~agebhard |
| 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._