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$",
Dear list,
The following behaviour looks like a bug:
grepl("ab{,2}c", "abbbc")
# [1] TRUE
I would expect either FALSE or an "invalid regex" error.
More details can be found in the question I originally asked here:
https://stackoverflow.com/q/4664/6656269
I've also opened an issue on the TR
In some cases, str() does not print the "names" attribute of the object:
u <- structure(c(5, 6), names = c("a", "b"), color = "blue")
str(u)
# atomic [1:2] 5 6
# - attr(*, "color")= chr "blue"
Is it a bug or a design choice?
Originally asked here:
https://stackoverflow.com/q/47185756/6656269