[Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Tim Hesterberg
When creating a package, I would like a way to tell R that a function with a period in its name is not a method. I'm writing a package now with a modified version of qr.R. R CMD check gives warnings: * checking S3 generic/method consistency ... WARNING qr: function(x, ...) qr.R: function(qr,

[Rd] Suggest adding a 'pivot' argument to qr.R

2012-09-07 Thread Tim Hesterberg
I suggest adding a 'pivot' argument to qr.R, to obtain columns in the same order as the original x, so that a <- qr(x) qr.Q(a) %*% qr.R(a, pivot=TRUE) returns x. -- # File src/library/base/R/qr.R qr.R <- function(qr, complete = FALSE, pivot = F

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Uwe Ligges
On 07.09.2012 17:05, Tim Hesterberg wrote: When creating a package, I would like a way to tell R that a function with a period in its name is not a method. You can't. There are few exception for historic names (S definitions) hardcoded in R. Best, Uwe I'm writing a package now with a

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Warnes, Gregory
On 9/7/12 12:55 PM, "Uwe Ligges" wrote: >On 07.09.2012 17:05, Tim Hesterberg wrote: >> When creating a package, I would like a way to tell R that >> a function with a period in its name is not a method. > >You can't. There are few exception for historic names (S definitions) >hardcoded in R. >

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Henrik Bengtsson
Would a workaround (for pleasing R CMD check) be to do: qr.R <- function(...) UseMethod("qr.R", ...) qr.R.qr <- function(qr, complete, pivot) { # No need to assert the class of 'qr' here. ... } Haven't tried it. Method dispatching may also add unnecessary overhead if called lots of times.

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Simon Urbanek
On Sep 7, 2012, at 12:59 PM, "Warnes, Gregory" wrote: > > On 9/7/12 12:55 PM, "Uwe Ligges" wrote: > >> On 07.09.2012 17:05, Tim Hesterberg wrote: >>> When creating a package, I would like a way to tell R that >>> a function with a period in its name is not a method. >> >> You can't. There ar

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Duncan Murdoch
On 07/09/2012 2:00 PM, Simon Urbanek wrote: On Sep 7, 2012, at 12:59 PM, "Warnes, Gregory" wrote: > > On 9/7/12 12:55 PM, "Uwe Ligges" wrote: > >> On 07.09.2012 17:05, Tim Hesterberg wrote: >>> When creating a package, I would like a way to tell R that >>> a function with a period in its name

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Simon Urbanek
On Sep 7, 2012, at 2:14 PM, Duncan Murdoch wrote: > On 07/09/2012 2:00 PM, Simon Urbanek wrote: >> On Sep 7, 2012, at 12:59 PM, "Warnes, Gregory" >> wrote: >> >> > >> > On 9/7/12 12:55 PM, "Uwe Ligges" wrote: >> > >> >> On 07.09.2012 17:05, Tim Hesterberg wrote: >> >>> When creating a package

Re: [Rd] Suggest adding a 'pivot' argument to qr.R

2012-09-07 Thread peter dalgaard
On Sep 7, 2012, at 17:16 , Tim Hesterberg wrote: > I suggest adding a 'pivot' argument to qr.R, to obtain columns in the > same order as the original x, so that > a <- qr(x) > qr.Q(a) %*% qr.R(a, pivot=TRUE) > returns x. That would come spiraling down in flames the first time someone tried to