[Dplr-commits] r1061 - in pkg/dplR: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 22 14:19:58 CET 2017
Author: mvkorpel
Date: 2017-02-22 14:19:58 +0100 (Wed, 22 Feb 2017)
New Revision: 1061
Modified:
pkg/dplR/ChangeLog
pkg/dplR/DESCRIPTION
pkg/dplR/R/latexify.R
Log:
Fix to unlikely case of running latexify() in C locale
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2017-02-20 11:35:55 UTC (rev 1060)
+++ pkg/dplR/ChangeLog 2017-02-22 13:19:58 UTC (rev 1061)
@@ -1,8 +1,14 @@
* CHANGES IN dplR VERSION 1.6.6
-File: R/rasterPlot.R
+File: latexify.R
----------------
+- Fixed conversion bugs in the latexify() utility when working in
+ the C locale.
+
+File: rasterPlot.R
+----------------
+
- In rasterPlot(Cairo = TRUE, ...), added a version check for the Cairo
package
Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION 2017-02-20 11:35:55 UTC (rev 1060)
+++ pkg/dplR/DESCRIPTION 2017-02-22 13:19:58 UTC (rev 1061)
@@ -3,7 +3,7 @@
Type: Package
Title: Dendrochronology Program Library in R
Version: 1.6.6
-Date: 2017-02-20
+Date: 2017-02-22
Authors at R: c(person("Andy", "Bunn", role = c("aut", "cph",
"cre", "trl"), email = "andy.bunn at wwu.edu"), person("Mikko",
"Korpela", role = c("aut", "trl")), person("Franco", "Biondi",
Modified: pkg/dplR/R/latexify.R
===================================================================
--- pkg/dplR/R/latexify.R 2017-02-20 11:35:55 UTC (rev 1060)
+++ pkg/dplR/R/latexify.R 2017-02-22 13:19:58 UTC (rev 1061)
@@ -25,6 +25,11 @@
if (any(encBytes)) {
y[encBytes] <- captureOutput(cat(y[encBytes], sep = "\n"))
}
+ ## Convert strings to UTF-8 encoding, NFD (decomposed) form, for
+ ## processing of accented characters. Doing this early to
+ ## circumvent pecularities in gsub() (and nchar()) when working in
+ ## the C locale.
+ y <- stri_trans_nfd(y)
Letters <- paste0(c(LETTERS, letters), collapse="")
fontenc <- "fontenc" %in% packages
textcomp <- "textcomp" %in% packages
@@ -326,9 +331,6 @@
list(c(paste0(tmp, "(?=$|[[:digit:],.?!;:\\\\}+*/-])"), "\\1"),
c(paste0(tmp, "(?! )"), "\\1 ")))
- ## Convert strings to UTF-8 encoding, NFD (decomposed) form, for
- ## processing of accented characters.
- y <- stri_trans_nfd(y)
## Apply the substitutions in the list
for (subst in substitutions) {
y <- gsub(subst[1], subst[2], y, perl = TRUE)
More information about the Dplr-commits
mailing list