From etiennesanchez2 at gmail.com  Mon Mar  5 17:48:19 2018
From: etiennesanchez2 at gmail.com (Etienne Sanchez)
Date: Mon, 5 Mar 2018 17:48:19 +0100
Subject: [Rd] Unclosed parenthesis in grep.Rd
In-Reply-To: <23196.65416.625348.282322@stat.math.ethz.ch>
References: <CAJmOi+PmYn3Xsb7OzsNBLTHQHtSueheg9yTB2=LAPEE2HTtkmw@mail.gmail.com>
 <23196.65416.625348.282322@stat.math.ethz.ch>
Message-ID: <CANgsd59hAjutKGQc5m-_q0XLsFFunPRZGao1jhNC_AfcHgT3oA@mail.gmail.com>

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



[Rd] Unclosed parenthesis in grep.Rd
Etienne Sanchez