system.file("",package") is documented to return the root of the package (as it did in the past). It actually returns "" (Win98, R1.3.0), breaking the SJava package Omitting the first argument does work correctly and so is a workaround if the argument is explicitly "" but not if it is the value of a variable. -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> tlumley writes:> system.file("",package") is documented to return the root of the > package (as it did in the past). It actually returns "" (Win98, > R1.3.0), breaking the SJava package> Omitting the first argument does work correctly and so is a workaround > if the argument is explicitly "" but not if it is the value of a > variable.Thomas, I think you are misreading the docs: we have system.file(..., package = "base", lib.loc = .lib.loc, pkg, lib) so the package argument must be named. I think you were caught by R> system.file("", "eda") [1] "" but you need to do R> system.file("", package = "eda") [1] "/usr/local/lib/R/library/eda/" -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 20 Aug 2001 tlumley@u.washington.edu wrote:> > system.file("",package") is documented to return the root of the package > (as it did in the past). It actually returns "" (Win98, R1.3.0), breaking > the SJava packageMy Unix systems give results like> system.file("", package="eda")[1] "/ext/R/1.3.0/lib/R/library/eda/"> system.file("",package="Rstreams")[1] "/ext/R/library/Rstreams/" under 1.3.0. It's the trailing slash that is the problem, and which is not as documented in the Value section. That is not a file under Windows, and so file.exists() fails. (That suprised me a bit, but one could argue it is not actually a file under Unix either: the directory file is /ext/R/1.3.0/lib/R/library/eda and that does work.) Rather than special-case system.file("",package), I think we should remove the `or \code{""}' from the documentation. (The problem with SJava on Windows is one of several I reported to DTL on Mon Jul 16.) -- Brian D. Ripley, ripley@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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._