[Dplr-commits] r1059 - in pkg/dplR: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 17 09:10:22 CET 2017


Author: mvkorpel
Date: 2017-02-17 09:10:22 +0100 (Fri, 17 Feb 2017)
New Revision: 1059

Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/R/rasterPlot.R
Log:
Version check for Cairo package in rasterPlot()


Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2017-02-16 12:14:43 UTC (rev 1058)
+++ pkg/dplR/ChangeLog	2017-02-17 08:10:22 UTC (rev 1059)
@@ -1,5 +1,11 @@
 * CHANGES IN dplR VERSION 1.6.6
 
+File: R/rasterPlot.R
+----------------
+
+- In rasterPlot(Cairo = TRUE, ...), added a version check for the Cairo
+  package
+
 File: DESCRIPTION
 ----------------
 

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2017-02-16 12:14:43 UTC (rev 1058)
+++ pkg/dplR/DESCRIPTION	2017-02-17 08:10:22 UTC (rev 1059)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.6.6
-Date: 2017-02-16
+Date: 2017-02-17
 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/rasterPlot.R
===================================================================
--- pkg/dplR/R/rasterPlot.R	2017-02-16 12:14:43 UTC (rev 1058)
+++ pkg/dplR/R/rasterPlot.R	2017-02-17 08:10:22 UTC (rev 1059)
@@ -16,7 +16,8 @@
     fallback <- TRUE
     for (k in 1:2) {
         if (Cairo2) {
-            if (requireNamespace("Cairo", quietly = TRUE)) {
+            if (requireNamespace("Cairo", quietly = TRUE) &&
+                packageVersion("Cairo") >= "1.4-8") {
                 caps <- Cairo::Cairo.capabilities()
                 if (isTRUE(as.vector(caps["raster"]))) {
                     fallback <- FALSE
@@ -33,7 +34,7 @@
                     break
                 }
             } else {
-                message("Cairo device unavailable")
+                message("Cairo device (>= 1.4-8) unavailable")
             }
             Cairo2 <- FALSE
         } else {



More information about the Dplr-commits mailing list