From h.wickham at gmail.com  Wed Jan 14 13:47:51 2015
From: h.wickham at gmail.com (Hadley Wickham)
Date: Wed, 14 Jan 2015 06:47:51 -0600
Subject: [Rd] R CMD check: "..." used in a situation where it does not
	exist
In-Reply-To: <CAP4zaHMeGiRLP=ZB9Yg=dOjZLS3J4BG8kqHD2=t1g8S3fQKnxg@mail.gmail.com>
References: <CAP4zaHMeGiRLP=ZB9Yg=dOjZLS3J4BG8kqHD2=t1g8S3fQKnxg@mail.gmail.com>
Message-ID: <CABdHhvHzJB=oxpaSq4fmww691hk5yfc9oteMsqRbhSCaASToUA@mail.gmail.com>

I think this is bug in R CMD check code.  I get a similar error:

rule: possible error in paste0(...): ... used in a situation where it
  does not exist

for the simple:

rule <- function(..., pad = "-") {
  if (nargs() == 0) {
    title <- ""
  } else {
    title <- paste0(...)
  }
  width <- getOption("width") - nchar(title) - 1
  message(title, " ", paste(rep(pad, width, collapse = "")))
}

where ... clearly does exist.

I skimmed the commits for the last couple of days - the most relevant
would seem to be this one by Michael Lawrence:
https://github.com/wch/r-source/commit/d3a42dabccb23462aa1e0a1edad00450f0a6131c
(but I might've missed others - many of the commit messages are not
terribly explanatory)

Hadley

On Wed, Jan 14, 2015 at 1:42 AM, Michal Burda <michal.burda at osu.cz> wrote:
> Dear R developers,
>
> when running R CMD check, the R Under development (unstable)
> (2015-01-13 r67453) gives me the following NOTE:
>
>
> cbind.fsets: possible error in list(...): ... used in a situation
> where it does not exist
>
>
> The file that causes this note contains:
>
>
> cbind.fsets <- function(..., deparse.level = 1) {
>     dots <- list(...)
>
>     res <- NULL
>     resVars <- NULL
>     resSpecs <- NULL
>
>     for (i in seq_along(dots)) {
>         arg <- dots[[i]]
>         argName <- names(dots)[i]
>
>         if (!is.null(arg)) {
>             if (!is.fsets(arg)) {
>                 stop("Function 'cbind.fsets' cannot bind arguments
> that are not valid 'fsets' objects")
>             }
>             class(arg) <- setdiff(class(arg), 'fsets')
>             if (is.null(res)) {
>                 resVars <- vars(arg)
>                 resSpecs <- specs(arg)
>                 res <- arg
>             } else {
>                 resVarNames <- c(names(resVars), names(vars(arg)))
>                 resVars <- c(resVars, vars(arg))
>                 names(resVars) <- resVarNames
>
>                 o1 <- matrix(0, nrow=nrow(resSpecs), ncol=ncol(specs(arg)))
>                 o2 <- matrix(0, nrow=nrow(specs(arg)), ncol=ncol(resSpecs))
>                 resSpecs <- rbind(cbind(resSpecs, o1),
>                                   cbind(o2, specs(arg)))
>                 colnames(resSpecs) <- names(resVars)
>                 rownames(resSpecs) <- names(resVars)
>                 res <- cbind(res, arg)
>             }
>         }
>     }
>
>     return(fsets(res, resVars, resSpecs))
> }
>
>
>
> I want to avoid any NOTES prior submitting my package to CRAN, but I
> cannot find any information what is wrong with my code and how to get
> rid of that message during R CMD check process.
>
> Does anybody of you know what is wrong with my code?
>
> Thank you, in advance.
>
>
>
> Best regards,
>
>
> Michal Burda
> junior researcher
>
>
> IT4Innovations NSC
> Institute for Research and Applications of Fuzzy Modeling   |
> University of Ostrava   |   IT4Innovations National Supercomputing
> Center
> 30. dubna 22   |   701 03  Ostrava   |   Czech Republic
> e-mail: michal.burda at osu.cz  |   web IRAFM: irafm.osu.cz  |   web
> IT4I: it4i.cz  |   phone: +420 597 09 1450
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



-- 
http://had.co.nz/



[Rd] R CMD check: "..." used in a situation where it does not exist
Hadley Wickham