Skip to content

library() help for Windows

2 messages · Budana_Prijadi@fmi.com, Brian Ripley

#
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Mon, 18 Nov 2002 Budana_Prijadi at fmi.com wrote:

            
loading my library of R only functions (no C calls).  After examining
the "library" script this difference was found:

[...]

Did you read the NEWS file?  Quite a bit has changed in that 3-version
upgrade.
previous versions do?  Why v1.6.1 checks for "DESCRIPTIONS"?

To load it properly (and you were not loading it properly before)  you
need to follow the instructions in `Writing R Extensions' about how to
create a package, and then on how to install it.

These days R relies on properly constructed packages, and it does now
check for this.  For ages packages have been required to have a
DESCRIPTION file.