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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 18 Nov 2002 Budana_Prijadi at fmi.com wrote:> I have just upgraded R v1.5.0 to v1.6.1 for Windows but have troubleloading 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.> How do I modify my library of functions to load it properly likeprevious 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. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._