Re: [Rd] substitute and expression (Peter Dalgaard)
In this connection, note the following > a4 <- 4 > plotThis <- bquote(alpha==.(a), list(a=a4)) > do.call(plot, list(1:10, main=do.call(expression, c(plotThis > do.call(plot, list(1:10, main=do.call(expression, plotThis))) Error in do.call(expression, plotThis) : second argument must be a list > ## Whereas plotThis has class "call", c(plotThis) has class "list" > class(plotThis) [1] "call" > class(c(plotThis)) [1] "list" > ## Thus, the following is possible: > do.call(plot, list(1:10, main=do.call(expression, list(plotThis Marc Schwartz pointed out to me., some considerable time ago, that one could use bquote() and .() to create the elements of a list object whose elements can be plotted in parallel as required, e.g., for axis labels, thus: > plot(1:2, 1:2, xaxt="n") > arg1 <- bquote(""< .(x), list(x=1.5)) > arg2 <- bquote("">= .(x), list(x=1.5)) > axis(1, at=1:2, labels=do.call(expression, list(arg1, arg2))) For a unified approach to use of do.call(expression, ...), maybe one should use bquote() and .()? John Maindonald email: [EMAIL PROTECTED] phone : +61 2 (6125)3473fax : +61 2(6125)5549 Centre for Mathematics & Its Applications, Room 1194, John Dedman Mathematical Sciences Building (Building 27) Australian National University, Canberra ACT 0200. On 18 Jul 2007, at 8:00 PM, [EMAIL PROTECTED] wrote: > From: Peter Dalgaard <[EMAIL PROTECTED]> > Date: 18 July 2007 1:39:50 AM > To: Deepayan Sarkar <[EMAIL PROTECTED]> > Cc: R Development Mailing List <[EMAIL PROTECTED]> > Subject: Re: [Rd] substitute and expression > > > Deepayan Sarkar wrote: >> On 7/16/07, Peter Dalgaard <[EMAIL PROTECTED]> wrote: >> >>> Deepayan Sarkar wrote: >>> Hi, I'm trying to understand whether the use of substitute() is appropriate/documented for plotmath annotation. The following two calls give the same results: > plot(1:10, main = expression(alpha == 1)) > do.call(plot, list(1:10, main = expression(alpha == 1))) > > But not these two: > plot(1:10, main = substitute(alpha == a, list(a = 2))) > do.call(plot, list(1:10, main = substitute(alpha == a, list(a = > 2 > > Error in as.graphicsAnnot(main) : object "alpha" not found (as a consequence, xyplot(..., main = substitute(alpha)) doesn't currently work.) On the other hand, this works: > foo <- function(x) plot(1, main = x) > foo(substitute(alpha)) > > I'm not sure how to interpret ?plotmath; it says If the 'text' argument to one of the text-drawing functions ('text', 'mtext', 'axis', 'legend') in R is an expression, the argument is interpreted as a mathematical expression... and uses substitute() in its examples, but > is.expression(substitute(alpha == a, list(a = 1))) > > [1] FALSE >>> I think you need to take plotmath out of the equation and study the >>> difference between objects of mode "call" and those of mode >>> "expression". Consider this: >>> f <- function(...)match.call() do.call(f, list(1:10, main = substitute(alpha == a, list(a = 2 >>> function(...)match.call() >>> (1:10, main = alpha == 2) do.call(list, list(1:10, main = substitute(alpha == a, list(a = 2 >>> Error in do.call(list, list(1:10, main = substitute(alpha == a, >>> list(a = >>> 2 : >>> object "alpha" not found >>> >>> The issue is that function ends up with an argument alpha == 2 >>> which it >>> proceeds to evaluate (lazily), where a direct call sees >>> substitute(.). It is a general problem with the do.call >>> mechanism >>> that it effectively pre-evaluates the argument list, which can >>> confuse >>> functions that rely on accessing the original argument >>> expression. Try, >>> e.g., do.call(plot, list(airquality$Wind, airquality$Ozone)) and >>> watch >>> the axis labels. >>> >> >> Right. Lazy evaluation was the piece I was missing. >> >> >>> Does it work if you use something like >>> >>> main = substitute(quote(alpha == a), list(a = 2))? >>> >> >> Not for xyplot, though I haven't figured out why. Turns out this also >> doesn't work: >> >> >>> plot(y ~ x, data = list(x = 1:10, y = 1:10), main = substitute >>> (alpha)) >>> >> Error in as.graphicsAnnot(main) : object "alpha" not found >> >> I'll take this to mean that the fact that substitute() works >> sometimes >> (for plotmath) is an undocumented side effect of the implementation >> that should not be relied upon. >> > Probably the correct solution is to use expression objects. More or > less > the entire reason for their existence is this sort of surprises. > > plot(y ~ x, data = list(x = 1:10, y = 1:10), main = > as.expression(substitute(alpha==a, list(a=2 > > I'm not going to investigate why this is necessary in connection with > plot(), but the core issue is probably > >> e <- quote(f
Re: [Rd] (PR#9796) write.dcf/read.dcf cycle converts missing entry
On Wed, 18 Jul 2007, Bill Dunlap wrote: > On Wed, 18 Jul 2007 [EMAIL PROTECTED] wrote: > >> I am seeing some problems here, for example when all the fields are >> missing, or all the fields in a row are missing. I've fixes for those, >> and will commit to R-devel shortly. > > write.dcf() is also used by print.packageDesription() so > this change affects how missing fields are printed there. > In 2.5 we got > > packageDescription("base", fields=c("Version","NoSuchField")) > Version: 2.5.0 > NoSuchField: NA > > -- File: /dept/devel/sw/R/R.linux.2.5.0/lib/R/library/base/DESCRIPTION > -- Fields read: Version, NoSuchField > and now it doesn't print anything about the non-existant field > > packageDescription("base", fields=c("Version","NoSuchField")) > Version: 2.6.0 > -- File: /homes/bill/R-svn/r-devel/R/library/base/DESCRIPTION > -- Fields read: Version, NoSuchField > If this isn't acceptable then write.dcf will need a new argument > to control the printing of missing lines. > > The missing trailing blank line is an inadvertant change (although > it makes appending fields to a single record dcf file possible). I've put in patches to address both of those issues. Brian >>> If you read a dcf file with read.dcf(file,fields=c("Field",...)) >>> and the file does not contain the desired field "Field", >>> read.dcf puts a character NA for that entry in its output >>> matrix. If you then call write.dcf, passing it the output >>> of read.dcf(), it will write the entry "Field: NA". A subsequent >>> read.dcf() on write.dcf's output file will then have a "NA", >>> not a character NA, in the entry for "Field". I think that >>> write.dcf() should not write lines in the output file where >>> the input matrix contains a character NA. >>> ... >>> The diff would be >>> 19,22c19,24 >>> < eor <- character(nr * nc) >>> < eor[seq.int(1, nr - 1) * nc] <- "\n" >>> < writeLines(paste(formatDL(rep.int(colnames(x), nr), c(t(x)), >>> < style = "list", width = width, indent = indent), eor, >>> --- tx <- t(x) not.na <- c(!is.na(tx)) eor <- character(sum(not.na)) eor[ c(diff(c(col(tx))[not.na]),0)==1 ] <- "\n" writeLines(paste(formatDL(rep.int(colnames(x), nr), c(tx), style = "list", width = width, indent = indent)[not.na], eor, > > [ The ==1 should be >=1 ] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Brian D. Ripley, [EMAIL PROTECTED] 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 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] substitute and expression (Peter Dalgaard)
John Maindonald wrote: > In this connection, note the following > > > a4 <- 4 > > plotThis <- bquote(alpha==.(a), list(a=a4)) > > do.call(plot, list(1:10, main=do.call(expression, c(plotThis > > do.call(plot, list(1:10, main=do.call(expression, plotThis))) > Error in do.call(expression, plotThis) : second argument must be a list > > > ## Whereas plotThis has class "call", c(plotThis) has class "list" > > class(plotThis) > [1] "call" > > class(c(plotThis)) > [1] "list" > > > ## Thus, the following is possible: > > do.call(plot, list(1:10, main=do.call(expression, list(plotThis > > > Marc Schwartz pointed out to me., some considerable time ago, > that one could use bquote() and .() to create the elements of a > list object whose elements can be plotted in parallel as required, > e.g., for axis labels, thus: > > > plot(1:2, 1:2, xaxt="n") > > arg1 <- bquote(""< .(x), list(x=1.5)) > > arg2 <- bquote("">= .(x), list(x=1.5)) > > axis(1, at=1:2, labels=do.call(expression, list(arg1, arg2))) > > For a unified approach to use of do.call(expression, ...), maybe > one should use bquote() and .()? > > I think I'd prefer as.expression() in both cases: do.call(plot, list(1:10, main=as.expression(plotThis))) axis(1, at=1:2, labels=as.expression(list(arg1, arg2))) -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] S4 and Namespaces problems {was "error message from lmer"}
Generic functions include a "package" slot. The concept is that only one definition of the generic _for a particular package_ should exist. For various reasons, there may be "copies" of that generic in multiple places (from the way namespaces work, e.g.) but the model is that they are really the same generic and dispatch the same methods. Changes now partly in place should enforce this model for 2.6.0. To each (non-generic) function in a package, there corresponds an implicit generic version, either by default or by the owner of the package having used a mechanism that's being added (function implicitGeneric() and friends). The mechanism allows arguments to be excluded from method dispatch or to prohibit a generic version entirely. As Robert says, there can be other generic functions of the same name, but they will have different package slots, and conceptually will be unrelated to each other. I think we are all looking for much the same solution. The proposed mechanism is to ensure that all the methods defined for a function foo from package A will be consistent, and use the same definition of the generic. So far as is evident at this point, the mechanism can be implemented with the implicit generic code, and probably some extra code invoked when packages/namespaces are attached/loaded, to catch new "copies" of a given generic. Extra tinkering for functions in base (other than establishing implicit generics) seems a different issue: The model for generics by package doesn't need to single out functions in base. John Prof Brian Ripley wrote: > On Wed, 18 Jul 2007, Robert Gentleman wrote: > > >> Hi, >> >> Martin Maechler wrote: >> >>> Here is a reproducible example for the Bug that both Sebastian >>> and Dale Barr found. >>> >>> As Brian mentioned in an another thread, >>> the problem is in the interaction of Namespaces and S4 generics >>> and which S4 generic should keep which methods. >>> >>> We know there are workarounds, but till now they seem either >>> ugly or very much against the idea that conceptually there >>> should be only one generic which may have methods defined in >>> many different packages / namespaces. >>> >> There should *not* be one generic. Generics are no different than any >> other function. Package A can have a generic named foo, and so can >> package B. Other packages that want to add methods to a generic named >> foo need to know which one they would like to add to. These generics >> can be masked. If Package A is first on the search path then that is the >> foo that is found first (and if Package B is first then that is the foo, >> users that specifically want foo from B should use B::foo). >> > > I do think base is a special case here, given its privileged position in > the namespace hierarchy. I'd take Martin's position as rather that there > should be only one generic derived by take-over from a function, at least > for those in base. > > I believe that if you are allowed to make a function in base S4-generic > (and it is not obvious that you should be in many cases), then the derived > generic should conceptually be in base and thus always be found in place > of that in base. Since base is not a normal environment or namespace, > that is not straightforward to implement but it should be possible by > (e.g.) C-level hacking and a environment to store such derived generics. > Primitives are rather different, and we now have a fairly efficient way to > allow designated primitives to have S4 methods. > > I believe the registration model for S3 methods is pretty much the right > one: methods are set on the first 'foo' on the relevant search path, and > that does not cause another 'foo' to be created elsewhere that may or may > not precede the original in the relevant search path (since there are > multiple search paths once namespaces enter the mix). > > The new implied generics model helps here: taking over a function in base > unaltered (the same as the implied generic) could be a derived generic, > and any alteration would create a new generic in your package. That > protects code in other namespaces from your alterations. > > >>> I would like us (R-core, mostly) to resolve this as quickly as >>> possible. >>> > > It seems tricky enough to need debate what we want for a while and aim for > 2.6.0. But we have been discussing it on and off for at least two years. > > Brian > > >>> - >>> >>> ### Do this in a fresh R session: >>> >>> summary # S3 generic >>> find("summary") # base >>> >>> library(stats4) >>> summary # S4 generic >>> find("summary") # stats4 , base >>> >>> library(lme4) >>> ## -> loads Matrix (and lattice) >>> find("summary") # lme4, Matrix, stats4 , base --- 4 times ! --- >>> >> Have they all defined generics? If that is the case then there are 4. >> >> We did discuss, and I hope to make pro
[Rd] package NULL not found
In performing Rcmd check I am getting this output regarding using Argument '' and a NULL package not found and it stops with an error: * using log directory 'C:/Rpkgs/sqldf.Rcheck' * using ARGUMENT ' ' __ignored__ R version 2.5.1 (2007-06-27) * checking for file 'sqldf/DESCRIPTION' ... OK * this is package 'sqldf' version '0.1-0' * checking package dependencies ... ERROR During startup - Warning messages: 1: there is no package called 'NULL ' in: library(package, lib.loc = lib.loc, character.only = TRUE, logical = TRUE, 2: package NULL in options("defaultPackages") was not found See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. My DESCRIPTION file looks like this: Package: sqldf Version: 0.1-0 Date: 2007-07-19 Title: SQL on data frames. Author: G. Grothendieck Maintainer: G. Grothendieck <[EMAIL PROTECTED]> Description: Thin layer over RSQLite and RMySQL facilitating use of SQL selects on data frames. Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn License: GPL (Version 3 or later) URL: http://code.google.com/p/sqldf/ and the entire package is at (click on Source tab): http://code.google.com/p/sqldf/ I am using > R.version.string # Windows XP [1] "R version 2.5.1 (2007-06-27)" Does anyone know what this means and how to fix it? The package itself seems to work. Its just getting it past Rcmd check that is the problem. Thanks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] trivial typo in ?crimtab
"New Scottland Yard" should be "New Scotland Yard" cheers Ben Bolker __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package NULL not found
I noticed I am getting the same messages when trying to check other packages too such as gsubfn which previously checked ok. I had recently reinstalled cygwin so its likely something to do with that but have not tracked it down. On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > In performing Rcmd check I am getting this output regarding using > Argument '' and a NULL package not found and it stops with an error: > > * using log directory 'C:/Rpkgs/sqldf.Rcheck' > * using ARGUMENT ' > ' __ignored__ R version 2.5.1 (2007-06-27) > * checking for file 'sqldf/DESCRIPTION' ... OK > * this is package 'sqldf' version '0.1-0' > * checking package dependencies ... ERROR > During startup - Warning messages: > 1: there is no package called 'NULL > ' in: library(package, lib.loc = lib.loc, character.only = TRUE, > logical = TRUE, > 2: package NULL > in options("defaultPackages") was not found > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. > > My DESCRIPTION file looks like this: > > Package: sqldf > Version: 0.1-0 > Date: 2007-07-19 > Title: SQL on data frames. > Author: G. Grothendieck > Maintainer: G. Grothendieck <[EMAIL PROTECTED]> > Description: Thin layer over RSQLite and RMySQL facilitating use of > SQL selects on data frames. > Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn > License: GPL (Version 3 or later) > URL: http://code.google.com/p/sqldf/ > > and the entire package is at (click on Source tab): > > http://code.google.com/p/sqldf/ > > I am using > > R.version.string # Windows XP > [1] "R version 2.5.1 (2007-06-27)" > > Does anyone know what this means and how to fix it? > > The package itself seems to work. Its just getting it past Rcmd check > that is the problem. > > Thanks. > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package NULL not found
On 19/07/2007 5:55 PM, Gabor Grothendieck wrote: > I noticed I am getting the same messages when trying to check other > packages too such as gsubfn which previously checked ok. > > I had recently reinstalled cygwin so its likely something to do with > that but have not tracked it down. Another possibility may be that you have a .RData file in the check directory, and it is masking some important function. This was a problem for me a few days ago with INSTALL; I don't know if it affects check. Duncan Murdoch > > On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: >> In performing Rcmd check I am getting this output regarding using >> Argument '' and a NULL package not found and it stops with an error: >> >> * using log directory 'C:/Rpkgs/sqldf.Rcheck' >> * using ARGUMENT ' >> ' __ignored__ R version 2.5.1 (2007-06-27) >> * checking for file 'sqldf/DESCRIPTION' ... OK >> * this is package 'sqldf' version '0.1-0' >> * checking package dependencies ... ERROR >> During startup - Warning messages: >> 1: there is no package called 'NULL >> ' in: library(package, lib.loc = lib.loc, character.only = TRUE, >> logical = TRUE, >> 2: package NULL >> in options("defaultPackages") was not found >> See the information on DESCRIPTION files in the chapter 'Creating R >> packages' of the 'Writing R Extensions' manual. >> >> My DESCRIPTION file looks like this: >> >> Package: sqldf >> Version: 0.1-0 >> Date: 2007-07-19 >> Title: SQL on data frames. >> Author: G. Grothendieck >> Maintainer: G. Grothendieck <[EMAIL PROTECTED]> >> Description: Thin layer over RSQLite and RMySQL facilitating use of >> SQL selects on data frames. >> Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn >> License: GPL (Version 3 or later) >> URL: http://code.google.com/p/sqldf/ >> >> and the entire package is at (click on Source tab): >> >> http://code.google.com/p/sqldf/ >> >> I am using >>> R.version.string # Windows XP >> [1] "R version 2.5.1 (2007-06-27)" >> >> Does anyone know what this means and how to fix it? >> >> The package itself seems to work. Its just getting it past Rcmd check >> that is the problem. >> >> Thanks. >> > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] trivial typo in ?crimtab
On 19/07/2007 5:10 PM, Ben Bolker wrote: > "New Scottland Yard" should be "New Scotland Yard" > Yes, I'll fix it. (The error is ours, it isn't in the original article.) Duncan Murdoch __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package NULL not found
Thanks. I tried performing the check from an empty directory but it still gave the same response. Where can I find the source code for the check process? * using log directory 'C:/Rpkgs/check/sqldf.Rcheck' * using ARGUMENT ' ' __ignored__ R version 2.5.1 (2007-06-27) * checking for file 'sqldf/DESCRIPTION' ... OK * this is package 'sqldf' version '0-1.0' * checking package dependencies ... ERROR During startup - Warning messages: 1: there is no package called 'NULL ' in: library(package, lib.loc = lib.loc, character.only = TRUE, logical = TRUE, 2: package NULL in options("defaultPackages") was not found See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 19/07/2007 5:55 PM, Gabor Grothendieck wrote: > > I noticed I am getting the same messages when trying to check other > > packages too such as gsubfn which previously checked ok. > > > > I had recently reinstalled cygwin so its likely something to do with > > that but have not tracked it down. > > Another possibility may be that you have a .RData file in the check > directory, and it is masking some important function. This was a > problem for me a few days ago with INSTALL; I don't know if it affects > check. > > Duncan Murdoch > > > > > On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > >> In performing Rcmd check I am getting this output regarding using > >> Argument '' and a NULL package not found and it stops with an error: > >> > >> * using log directory 'C:/Rpkgs/sqldf.Rcheck' > >> * using ARGUMENT ' > >> ' __ignored__ R version 2.5.1 (2007-06-27) > >> * checking for file 'sqldf/DESCRIPTION' ... OK > >> * this is package 'sqldf' version '0.1-0' > >> * checking package dependencies ... ERROR > >> During startup - Warning messages: > >> 1: there is no package called 'NULL > >> ' in: library(package, lib.loc = lib.loc, character.only = TRUE, > >> logical = TRUE, > >> 2: package NULL > >> in options("defaultPackages") was not found > >> See the information on DESCRIPTION files in the chapter 'Creating R > >> packages' of the 'Writing R Extensions' manual. > >> > >> My DESCRIPTION file looks like this: > >> > >> Package: sqldf > >> Version: 0.1-0 > >> Date: 2007-07-19 > >> Title: SQL on data frames. > >> Author: G. Grothendieck > >> Maintainer: G. Grothendieck <[EMAIL PROTECTED]> > >> Description: Thin layer over RSQLite and RMySQL facilitating use of > >> SQL selects on data frames. > >> Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn > >> License: GPL (Version 3 or later) > >> URL: http://code.google.com/p/sqldf/ > >> > >> and the entire package is at (click on Source tab): > >> > >> http://code.google.com/p/sqldf/ > >> > >> I am using > >>> R.version.string # Windows XP > >> [1] "R version 2.5.1 (2007-06-27)" > >> > >> Does anyone know what this means and how to fix it? > >> > >> The package itself seems to work. Its just getting it past Rcmd check > >> that is the problem. > >> > >> Thanks. > >> > > > > __ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package NULL not found
On 19/07/2007 7:16 PM, Gabor Grothendieck wrote: > Thanks. I tried performing the check from an empty directory but > it still gave the same response. Where can I find the source code > for the check process? On Windows the main wrapper is a Perl script in RHOME/bin/check, but most of the work is done by routines in the tools package. The one that seems to be dying for you is tools:::.check_package_depends. Duncan Murdoch > > * using log directory 'C:/Rpkgs/check/sqldf.Rcheck' > * using ARGUMENT ' > ' __ignored__ R version 2.5.1 (2007-06-27) > * checking for file 'sqldf/DESCRIPTION' ... OK > * this is package 'sqldf' version '0-1.0' > * checking package dependencies ... ERROR > During startup - Warning messages: > 1: there is no package called 'NULL > ' in: library(package, lib.loc = lib.loc, character.only = TRUE, > logical = TRUE, > 2: package NULL > in options("defaultPackages") was not found > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. > > > On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> On 19/07/2007 5:55 PM, Gabor Grothendieck wrote: >>> I noticed I am getting the same messages when trying to check other >>> packages too such as gsubfn which previously checked ok. >>> >>> I had recently reinstalled cygwin so its likely something to do with >>> that but have not tracked it down. >> Another possibility may be that you have a .RData file in the check >> directory, and it is masking some important function. This was a >> problem for me a few days ago with INSTALL; I don't know if it affects >> check. >> >> Duncan Murdoch >> >>> On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: In performing Rcmd check I am getting this output regarding using Argument '' and a NULL package not found and it stops with an error: * using log directory 'C:/Rpkgs/sqldf.Rcheck' * using ARGUMENT ' ' __ignored__ R version 2.5.1 (2007-06-27) * checking for file 'sqldf/DESCRIPTION' ... OK * this is package 'sqldf' version '0.1-0' * checking package dependencies ... ERROR During startup - Warning messages: 1: there is no package called 'NULL ' in: library(package, lib.loc = lib.loc, character.only = TRUE, logical = TRUE, 2: package NULL in options("defaultPackages") was not found See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. My DESCRIPTION file looks like this: Package: sqldf Version: 0.1-0 Date: 2007-07-19 Title: SQL on data frames. Author: G. Grothendieck Maintainer: G. Grothendieck <[EMAIL PROTECTED]> Description: Thin layer over RSQLite and RMySQL facilitating use of SQL selects on data frames. Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn License: GPL (Version 3 or later) URL: http://code.google.com/p/sqldf/ and the entire package is at (click on Source tab): http://code.google.com/p/sqldf/ I am using > R.version.string # Windows XP [1] "R version 2.5.1 (2007-06-27)" Does anyone know what this means and how to fix it? The package itself seems to work. Its just getting it past Rcmd check that is the problem. Thanks. >>> __ >>> R-devel@r-project.org mailing list >>> https://stat.ethz.ch/mailman/listinfo/r-devel >> __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] package NULL not found
It turned out that when I reinstalled cygwin I put it first on the path and its not supposed to be. I wonder if R build tools could check for this by running a cygwin program that is also in Rtools and if one gets the cygwin output rather than the Rtools output it could warn the user to change his path. I found it quite difficult to solve this problem. On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 19/07/2007 7:16 PM, Gabor Grothendieck wrote: > > Thanks. I tried performing the check from an empty directory but > > it still gave the same response. Where can I find the source code > > for the check process? > > On Windows the main wrapper is a Perl script in RHOME/bin/check, but > most of the work is done by routines in the tools package. The one that > seems to be dying for you is tools:::.check_package_depends. > > Duncan Murdoch > > > > > * using log directory 'C:/Rpkgs/check/sqldf.Rcheck' > > * using ARGUMENT ' > > ' __ignored__ R version 2.5.1 (2007-06-27) > > * checking for file 'sqldf/DESCRIPTION' ... OK > > * this is package 'sqldf' version '0-1.0' > > * checking package dependencies ... ERROR > > During startup - Warning messages: > > 1: there is no package called 'NULL > > ' in: library(package, lib.loc = lib.loc, character.only = TRUE, > > logical = TRUE, > > 2: package NULL > > in options("defaultPackages") was not found > > See the information on DESCRIPTION files in the chapter 'Creating R > > packages' of the 'Writing R Extensions' manual. > > > > > > On 7/19/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 19/07/2007 5:55 PM, Gabor Grothendieck wrote: > >>> I noticed I am getting the same messages when trying to check other > >>> packages too such as gsubfn which previously checked ok. > >>> > >>> I had recently reinstalled cygwin so its likely something to do with > >>> that but have not tracked it down. > >> Another possibility may be that you have a .RData file in the check > >> directory, and it is masking some important function. This was a > >> problem for me a few days ago with INSTALL; I don't know if it affects > >> check. > >> > >> Duncan Murdoch > >> > >>> On 7/19/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > In performing Rcmd check I am getting this output regarding using > Argument '' and a NULL package not found and it stops with an error: > > * using log directory 'C:/Rpkgs/sqldf.Rcheck' > * using ARGUMENT ' > ' __ignored__ R version 2.5.1 (2007-06-27) > * checking for file 'sqldf/DESCRIPTION' ... OK > * this is package 'sqldf' version '0.1-0' > * checking package dependencies ... ERROR > During startup - Warning messages: > 1: there is no package called 'NULL > ' in: library(package, lib.loc = lib.loc, character.only = TRUE, > logical = TRUE, > 2: package NULL > in options("defaultPackages") was not found > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. > > My DESCRIPTION file looks like this: > > Package: sqldf > Version: 0.1-0 > Date: 2007-07-19 > Title: SQL on data frames. > Author: G. Grothendieck > Maintainer: G. Grothendieck <[EMAIL PROTECTED]> > Description: Thin layer over RSQLite and RMySQL facilitating use of > SQL selects on data frames. > Depends: R (>= 2.5.1), RSQLite (>= 0.5-5), gsubfn > License: GPL (Version 3 or later) > URL: http://code.google.com/p/sqldf/ > > and the entire package is at (click on Source tab): > > http://code.google.com/p/sqldf/ > > I am using > > R.version.string # Windows XP > [1] "R version 2.5.1 (2007-06-27)" > > Does anyone know what this means and how to fix it? > > The package itself seems to work. Its just getting it past Rcmd check > that is the problem. > > Thanks. > > >>> __ > >>> R-devel@r-project.org mailing list > >>> https://stat.ethz.ch/mailman/listinfo/r-devel > >> > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel