[R] library() help for Windows

Budana_Prijadi@fmi.com Budana_Prijadi at fmi.com
Mon Nov 18 14:33:29 CET 2002


Sorry... for this (I have to think before pressing the "send" button).

I have found what I was looking for in R-exts.pdf which accompanies the binary executable.

And the necessary DESCRIPTION file in a library directory ease documentation and makes things more orderly!  Bravo!

Budana

-----Original Message-----
From: Prijadi, Budana 
Sent: Monday, November 18, 2002 10:15 PM
To: r-help at stat.math.ethz.ch
Subject: [R] library() help for Windows



Dear R users,

I have just upgraded R v1.5.0 to v1.6.1 for Windows but have trouble loading my library of R only functions (no C calls).  After examining the "library" script this difference was found:

(v1.5.0)
which.lib.loc <- dirname(pkgpath)
            descfile <- system.file("DESCRIPTION", package = package, 
                lib.loc = which.lib.loc)
            if (nchar(descfile)) 
                testRversion(descfile)
            if (exists("packageHasNamespace") && packageHasNamespace(package, 
                which.lib.loc)) 
                return(doNamespaceLibrary(package, which.lib.loc, 
                  lib.loc, logical.return))
            codeFile <- file.path(which.lib.loc, package, "R", 
                package)
            loadenv <- new.env(hash = TRUE, parent = .GlobalEnv)

(v1.6.1)
which.lib.loc <- dirname(pkgpath)
            descfile <- system.file("DESCRIPTION", package = package, 
                lib.loc = which.lib.loc)
            if (nchar(descfile)) 
                testRversion(descfile)
            else stop("This is not a valid package -- no DESCRIPTION exists")
            if (exists("packageHasNamespace") && packageHasNamespace(package, 
                which.lib.loc)) 
                return(doNamespaceLibrary(package, which.lib.loc, 
                  lib.loc, logical.return))
            codeFile <- file.path(which.lib.loc, package, "R", 
                package)


As a result, an error pops: This is not a valid package -- no DESCRIPTION exists

How do I modify my library of functions to load it properly like previous versions do?  Why v1.6.1 checks for "DESCRIPTIONS"?

Thanks in advance!

Budana Prijadi
Process Control Engineer
PT FREEPORT INDONESIA

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list