[R-pkg-devel] Fwd: CRAN packages maintained by you

Ege Rubak rubak at math.aau.dk
Fri Apr 14 18:15:59 CEST 2017


Hi,
We had this issue with `median.im` in spatstat. I wasn't involved in 
fixing it, but maintainer Adrian Baddeley changed the documentation 
according to CRAN instructions. You can see it here:
https://github.com/spatstat/spatstat/blob/master/man/mean.im.Rd
Maybe you can use that for inspiration...
Cheers,
Ege

On 04/15/2017 12:02 AM, Jens Oehlschlägel wrote:
> Hi, I was asked by CRAN-maintainers to provide two versions of
> median.integer64, one with and one without a dots-argument.
>
> However, doing so results in a code-documentation mismatch, because I have
>
> \method{median}{integer64}(x, na.rm = FALSE)
>
> and now also need
>
> \method{median}{integer64}(x, na.rm = FALSE, \dots)
>
> but selecting between both using \Sexpr{} seems not to be allowed in a
> Rd-usage-section.
>
> Anyone knows the proper way to do this?
>
>
> Jens Oehlschl�gel
>
>
>
> -------- Forwarded Message --------
> Subject: 	CRAN packages maintained by you
> Date: 	Thu, 23 Mar 2017 18:08:18 +0100
> From: 	Kurt Hornik <Kurt.Hornik at wu.ac.at>
> Reply-To: 	CRAN at R-project.org
> To: 	achim.zeileis at r-project.org, andri at signorell.net, claudio at unive.it,
> edzer.pebesma at uni-muenster.de, j.curran at auckland.ac.nz,
> jens.oehlschlaegel at truecluster.com, jouni at kerman.com, mx.herve at gmail.com
> CC: 	CRAN at R-project.org
>
>
>
> Dear maintainers,
>
> This concerns the CRAN packages
>
>    Bolstad DescTools RVAideMemoire bit64 circular rv units zoo
>
> maintained by one of you:
>
>    Achim Zeileis <Achim.Zeileis at R-project.org>: zoo
>    Andri Signorell <andri at signorell.net>: DescTools
>    Claudio Agostinelli <claudio at unive.it>: circular
>    Edzer Pebesma <edzer.pebesma at uni-muenster.de>: units
>    James Curran <j.curran at auckland.ac.nz>: Bolstad
>    Jens Oehlschl�gel <Jens.Oehlschlaegel at truecluster.com>: bit64
>    Jouni Kerman <jouni at kerman.com>: rv
>    Maxime Herv� <mx.herve at gmail.com>: RVAideMemoire
>
> You may already have noticed that under r-devel these have given
> warnings like
>
> * checking S3 generic/method consistency ... WARNING
> median:
>    function(x, na.rm, ...)
> median.Bolstad:
>    function(x, na.rm)
>
> for some time now, following
>
>       \item \code{median()} gains a formal \code{\dots} argument, so
>        methods with extra arguments can be provided.
>
> Could you please update your package code to eliminate these warnings,
> ideally as quickly as possible?
>
> In one package co-developed by me, I went for
>
> if(is.na(match("...", names(formals(median))))) {
>      median.tuple <- function(x, na.rm = FALSE) {
>          x <- as.numeric(x)
>          NextMethod()
>      }
> } else {
>      median.tuple <- function(x, na.rm = FALSE, ...) {
>          x <- as.numeric(x)
>          NextMethod()
>      }
> }
>
> which may be the "simplest" way forward ...
>
> Best
> -k
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list