[Rd] should system.file(package="no such pkg", "no such file") warn or abort?

2008-09-09 Thread Bill Dunlap
Currently system.file(package="no such pkg","no","such","file") silently returns the empty string, "", if said file doesn't exist. This forces the caller to check for "" or risk getting a mysterious error message from a function requiring a file name. E.g., > read.dcf(system.file(package="

[Rd] Defining an alias for a generic function and callNextMethod() strange behaviour

2008-09-09 Thread Herve Pages
Hi, My package contains the following foo() generic and methods (simplified version): setGeneric("foo", signature="x", function(x, y=NA) standardGeneric("foo")) setMethod("foo", "ANY", function(x, y=NA) list(x, y)) setMethod("foo", "character", function(x, y=NA) unlist(callNextMethod()))

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Aha, it works if I do setGeneric("order", signature="...") However the problem with that is that it generates a warning which I cannot suppress on install: Creating a generic for "order" in package "AHLCalendar" (the supplied definition differs from and overrides the implicit generic in pa

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread John Chambers
Sklyar, Oleg (London) wrote: > Ha, defined xtfrm for TimeDate, works instantly (xtfrm is already a > method). However, it won't be taken up by order as it is not in the > imported namespace, so order falls back to xtfrm.default. > By "method" you mean "generic"? xtfrm is an S3 generic. I'm not

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
In fact it all comes back to 'rank', which uses 'order(x[!nas])' internally. Surprisingly one does not get an infinite recursion: rank -> order -> xtfrm -> rank -> ... This is obviously only one of possible outcomes, yet it seems to be happening. Previous implementation of order did not have a ref

Re: [Rd] Addendum to wishlist bug report #10931 (factanal) (PR#12754)

2008-09-09 Thread John Fox
Dear Ulrich, I'd frankly forgotten about this, but can't see an argument for not making this (or a similar) change. Thanks for reviving the issue. John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socserv.mcmaster

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Ha, defined xtfrm for TimeDate, works instantly (xtfrm is already a method). However, it won't be taken up by order as it is not in the imported namespace, so order falls back to xtfrm.default. Moreover, defining order (which is not a method unfortunately, *any chance of changing this*?): setGene

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Thanks for a quick reply, I was thinking of [ methods myself, but there are so many of them. I only tested [(x=TimeDate,i=TimeDate,j=missing), which is a completely non-standard one. It did not seem to have any effect though. I was thinking of writing the 'order' method and will experiment with g

Re: [Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread John Chambers
No definitive answers, but here are a few observations. In the call to order() code, I notice that you have dropped into the branch if (any(unlist(lapply(z, is.object where the alternative in your case would seem to have been going directly to the internal code. You can consider a method

[Rd] Addendum to wishlist bug report #10931 (factanal) (PR#12754)

2008-09-09 Thread ulrich . keller
--=-hiYzUeWcRJ/+kx41aPIZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Hi, on March 10 I filed a wishlist bug report asking for the inclusion of some changes to factanal() and the associated print method. The changes were originally proposed by John Fox in 2005; they m

[Rd] legend does not reset xpd (PR#12756)

2008-09-09 Thread mark_difford
Full_Name: Mark Difford Version: R version 2.7.2 Patched (2008-08-26 r46442) OS: Windows -- Vista Submission from: (NULL) (198.54.202.146) legend(graphics) does not reset xpd to its pre-call state when it has finished drawing the legend. ## Ex. par(xpd = FALSE) plot(1) legend("top", legend="Tops

[Rd] 'xtfrm' performance (influences 'order' performance) in R devel

2008-09-09 Thread Sklyar, Oleg (London)
Hello everybody, it looks like the presense of some (do know know which) S4 methods for a given S4 class degrades the performance of xtfrm (used in 'order' in new R-devel) by a factor of millions. This is for classes that ARE derived from numeric directly and thus should be quite trivial to conver

Re: [Rd] package "signal", function "filter" (PR#12752)

2008-09-09 Thread hadley wickham
On Tue, Sep 9, 2008 at 2:30 AM, <[EMAIL PROTECTED]> wrote: > Package 'signal' is not the responsibility of the R developers, so you > need to follow the FAQ and report this to the maintainer, rather than > clog up R-bgs with an inappopriate report. > > You might find that R's own function filter()

Re: [Rd] package "signal", function "filter" (PR#12752)

2008-09-09 Thread ripley
Package 'signal' is not the responsibility of the R developers, so you need to follow the FAQ and report this to the maintainer, rather than clog up R-bgs with an inappopriate report. You might find that R's own function filter() is better written. The FAQ also asks you not to report on long ob

[Rd] package "signal", function "filter" (PR#12752)

2008-09-09 Thread jschenck
Full_Name: Jeff Schenck Version: 2.6.2 (signal v. 0.5) OS: Windows XP Submission from: (NULL) (128.107.248.220) The "filter" function in the package "signal" does not properly handle recursive filters with only two feedback taps. I looked at the source code in filter.R. There is a line that say