search for: hughparsonag

Displaying 2 results from an estimated 2 matches for "hughparsonag".

Did you mean: hughparsonage
2018 May 03
1
Proposed speedup of ifelse
...1:28, 4, 7) ifelse(M, 1, 2) The performance improvement does not rely on this, however; so if current behaviour in these cases is intended, the patch can be trivially amended to reflect this. I've written up a short note detailing the performance improvements and some unit tests at https://hughparsonage.github.io/content/post/A-new-ifelse.html Best Hugh Parsonage
2017 Jun 19
0
\U or \L perl regex in gsub removes text outside capturing group in UTF-8 contexts
...gsub appears to have changed from R 3.4.0, but the documentation for the replacement argument has not. ## Reprex (A call to readLines is essential. A url is provided for convenience but the behaviour should reproduce for local files) bib <- readLines(" https://raw.githubusercontent.com/HughParsonage/TeXCheckR/master/tests/testthat/lint_bib_in.bib", encoding = "UTF-8", n = 10) bib8910 <- bib[8:10] gsub("(\\w+)", "\\U\\1", bib8910, perl = TRUE) #> [1] "@TECHREPORT" " AUTHOR" " TITLE" Expected result (in R 3.4.0): #>...