[Rd] Unclosed parenthesis in grep.Rd

Etienne Sanchez etiennesanchez2 at gmail.com
Mon Mar 5 17:48:19 CET 2018


There are probably more unmatched parentheses around:

detect <- function(file) {
  text <- paste(readLines(file), collapse = "")
  nchar(gsub("[^(]", "", text)) != nchar(gsub("[^)]", "", text))
}

docs <- list.files("r-source-trunk/src/library",
                   pattern = "\\.Rd$",
                   full.names = TRUE,
                   recursive = TRUE)

suspicious <- docs[sapply(docs, detect)]

length(suspicious)
# [1] 114


2018-03-05 9:27 GMT+01:00 Martin Maechler <maechler at stat.math.ethz.ch>:
>
> >>>>> Hugh Parsonage <hugh.parsonage at gmail.com>
> >>>>>     on Mon, 5 Mar 2018 13:39:24 +1100 writes:
>
>     > Lines 129-131: \code{grep(value = FALSE)} returns a vector
>     > of the indices of the elements of \code{x} that yielded a
>     > match (or not, for \code{invert = TRUE}. This will be an
>     > integer vector unless the input
>
>     > There should be a closing parenthesis after \code{invert =
>     > TRUE}
>
> Thank you, Hugh!  I've added the ')' now.
> Martin
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list