Re: [Rd] Unclosed parenthesis in grep.Rd

2018-03-05 Thread Etienne Sanchez
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$",

[Rd] Possible bug with a regex pattern

2017-11-04 Thread Etienne Sanchez
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

[Rd] str() not displaying names

2017-11-14 Thread Etienne Sanchez
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