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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 8 19:56:39 CET 2019


Author: andybunn
Date: 2019-02-08 19:56:39 +0100 (Fri, 08 Feb 2019)
New Revision: 1139

Added:
   pkg/dplR/man/dplR-defunct.Rd
Removed:
   pkg/dplR/man/plotRings.Rd
Modified:
   pkg/dplR/ChangeLog
   pkg/dplR/DESCRIPTION
   pkg/dplR/NAMESPACE
   pkg/dplR/R/plotRings.R
Log:
pushing the version w/out plotRings as request of a user.

Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog	2018-12-13 17:51:52 UTC (rev 1138)
+++ pkg/dplR/ChangeLog	2019-02-08 18:56:39 UTC (rev 1139)
@@ -1,5 +1,12 @@
 * CHANGES IN dplR VERSION 1.7.0
 
+
+File: plotRings.R and .Rd
+----------------
+
+- Making plotRings defunct as there were too maby issues with the animation library and especially imageMajick integrating smoothly for some users. Suggested to Darwin that he make plotRings a stand alone library.
+
+
 File: xdate-dplR.Rnw
 ----------------
 

Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION	2018-12-13 17:51:52 UTC (rev 1138)
+++ pkg/dplR/DESCRIPTION	2019-02-08 18:56:39 UTC (rev 1139)
@@ -3,7 +3,7 @@
 Type: Package
 Title: Dendrochronology Program Library in R
 Version: 1.7.0
-Date: 2018-12-12
+Date: 2018-02-08
 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", "cph", "trl")), person("Franco", "Biondi",
@@ -13,9 +13,7 @@
         person("Christian", "Zang", role = c("aut", "cph")),
         person("Allan", "Buras", role = "ctb"), person("Jacob",
         "Cecile", role = "ctb"), person("Manfred", "Mudelsee", role =
-        "ctb"), person("Michael", "Schulz", role = "ctb"),
-        person("Darwin", "Pucha-Cofrep", role = c("aut", "cph")),
-        person("Jakob", "Wernicke", role = c("aut", "cph")))
+        "ctb"), person("Michael", "Schulz", role = "ctb"))
 Author: Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, cph, trl], Franco Biondi [aut, cph], Filipe Campelo [aut, cph], Pierre Mérian [aut, cph], Fares Qeadan [aut, cph], Christian Zang [aut, cph], Allan Buras [ctb], Jacob Cecile [ctb], Manfred Mudelsee [ctb], Michael Schulz [ctb], Darwin Pucha-Cofrep [aut, cph], Jakob Wernicke [aut, cph]
 Copyright: Authors and file inst/COPYRIGHTS
 Maintainer: Andy Bunn <andy.bunn at wwu.edu>
@@ -23,8 +21,7 @@
 Imports: graphics, grDevices, grid, stats, utils, lattice (>= 0.13-6),
         Matrix (>= 1.0-3), digest (>= 0.2.3), matrixStats (>= 0.50.2),
         png (>= 0.1-2), R.utils (>= 1.32.1), stringi (>= 0.2-3),
-        stringr (>= 0.4), XML (>= 2.1-0), plyr (>= 1.8), animation (>=
-        2.0-2), signal
+        stringr (>= 0.4), XML (>= 2.1-0), plyr (>= 1.8), signal
 Suggests: Biobase, Cairo (>= 1.5-0), dichromat (>= 1.2-3), foreach,
         forecast (>= 3.6), gmp (>= 0.5-5), iterators, knitr,
         RColorBrewer, testthat (>= 0.8), tikzDevice, waveslim

Modified: pkg/dplR/NAMESPACE
===================================================================
--- pkg/dplR/NAMESPACE	2018-12-13 17:51:52 UTC (rev 1138)
+++ pkg/dplR/NAMESPACE	2019-02-08 18:56:39 UTC (rev 1139)
@@ -36,8 +36,6 @@
 
 importFrom(plyr, alply)
 
-importFrom(animation, saveGIF, ani.options)
-
 importFrom(signal, butter, filtfilt)
 
 

Modified: pkg/dplR/R/plotRings.R
===================================================================
--- pkg/dplR/R/plotRings.R	2018-12-13 17:51:52 UTC (rev 1138)
+++ pkg/dplR/R/plotRings.R	2019-02-08 18:56:39 UTC (rev 1139)
@@ -1,240 +1,4 @@
-plotRings <- function(year, trwN, trwS = NA_real_,
-                      trwE = NA_real_, trwW = NA_real_,
-                      length.unit = "mm",
-                      animation = FALSE, 
-                      sys.sleep = 0.2, 
-                      year.labels = FALSE, 
-                      d2pith = NA,
-                      col.inrings = "grey", col.outring = "black", 
-                      x.rings = "none", col.x.rings = "red",
-                      xy.lim = NULL,
-                      species.name = NA,
-                      saveGIF=FALSE, fname="GIF_plotRings.gif") {
-  
-  ## Creating a data.frame
-  TRW <- data.frame(row.names = year, trwN = trwN, 
-                    trwS = if (exists("trwS") == TRUE) 
-                      trwS
-                    else NA, trwE = if (exists("trwE") == TRUE) 
-                      trwE
-                    else NA, trwW = if (exists("trwW") == TRUE) 
-                      trwW
-                    else NA)
-  
-  ## Setting the length unit of ring measurement
-  if(length.unit == "mm") 
-    TRW[, 1:4] <- TRW[, 1:4]    
-  else if(length.unit == "1/10 mm") 
-    TRW[, 1:4] <- TRW[, 1:4]/10 
-  else if(length.unit == "1/100 mm") 
-    TRW[, 1:4] <- TRW[, 1:4]/100
-  else if(length.unit == "1/1000 mm") 
-    TRW[, 1:4] <- TRW[, 1:4]/1000 
-  
-  ## Setting the unit of d2pith
-  if(length.unit == "mm") 
-    d2pith <- d2pith
-  else if(length.unit == "1/10 mm") 
-    d2pith <- d2pith/10 
-  else if(length.unit == "1/100 mm") 
-    d2pith <- d2pith/100
-  else if(length.unit == "1/1000 mm") 
-    d2pith <- d2pith/1000
-  
-  
-  TRW <- TRW[as.logical((rowSums(is.na(TRW))-length(TRW))),] # It is to remove rows with NAs across all rows
-  
-  # trw means
-  TRW$trw.means <- rowMeans(TRW, na.rm = TRUE)
-  
-  # Distance to pith (d2pith)
-  # Add a new row with the d2pith value at the first position if this argument is assigned
-  if (!is.na(mean(d2pith, na.rm = T))) {
-    TRW.d2pith <- TRW[1, 1:4]
-    TRW.d2pith[1,] <- NA
-    rownames(TRW.d2pith)[1] <- as.numeric(rownames(TRW))[1]-1 
-    TRW.d2pith$trw.means[1] <-  d2pith 
-    TRW <- rbind(TRW.d2pith, TRW)
-  }
-  
-  # Accumulative trw.means
-  TRW$trw.acc <- cumsum(TRW$trw.means)
-  
-  # Eccentricity
-  y <- TRW$trwN - TRW$trwS   # eccentricity2
-  y[is.na(y)] <- 0
-  if(exists("y")==TRUE) TRW$N_S <- y  # add to the TRW data.frame
-  x <- TRW$trwE - TRW$trwW   # eccentricity1
-  x[is.na(x)] <- 0
-  if(exists("x")==TRUE) TRW$E_W <- x  # add to the TRW data.frame
-  z <- TRW$trw.acc   # accumulative rings
-  
-  
-  # Getting and coloring the narrow and wider rings
-  q2 <- as.numeric(quantile(TRW[,5])[2]) # quantile 25% of trw.means
-  col.narrow.rings <- ifelse(TRW[,5] <= q2, col.x.rings, col.inrings) 
-  q4 <- as.numeric(quantile(TRW[,5])[4]) # quantile 75% of trw.means
-  col.wider.rings <- ifelse(TRW[,5] >= q4, col.x.rings, col.inrings) 
-  
-  
-  
-  ## AREA calculation: pi(radius)^2    ||  pi(z)^2
-  
-  # Acummulative BAI (inside out)
-  TRW$bai.acc <- pi*(TRW$trw.acc)^2  
-  # Individual BAI (inside out)
-  TRW$bai.ind  <-c(TRW$bai.acc[1], TRW$bai.acc[2:nrow(TRW)] - TRW$bai.acc[1:nrow(TRW)-1]) 
-  
-  # # # # # # # # # # # # # # # # # # # ## # # # # # # # # # # # # # # # # # # #
-  # set plotting parameters for all the plots that might follow
-  op <- par(no.readonly=TRUE)
-  on.exit(par(op), add=TRUE)
-  par(mar=c(4,4,4,1)+0.1,xaxs="i",yaxs="i",pty="s",mgp=c(1.5,0.5,0))
-  dev.hold()
-  on.exit(dev.flush(), add=TRUE)
-  ## Plotting  
-  if (animation == TRUE) {
-    
-    # With animation
-    for (i in 1:length(x)) {
-      # Rings
-      cols <-  c(rep(col.inrings, i-1), col.outring) 
-      narrow.cols <- c(col.narrow.rings[1:i-1], col.outring) # colors when is selected "narrow.rings"
-      wider.cols <- c(col.wider.rings[1:i-1], col.outring) # colors when is selected "wider.rings"
-      #auto.lim <- max(z, na.rm = TRUE) * 2.0
-      if(is.null(xy.lim)) xy.lim <- max(z, na.rm = TRUE) * 1.05
-      
-      symbols(y = y[1:i], x = if(length(x) > 0) y[1:i] else x[1:i],
-              circles=z[1:i], inches=FALSE, xlim = c(-xy.lim, xy.lim), ylim = c(-xy.lim, xy.lim), 
-              xlab='Width [mm]', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))),
-                                                     line=1.5,adj=0.5, side=3, cex=1.5), 
-              sub=if(!is.na(species.name)) mtext(bquote(~plain(.("(")) ~italic(.(species.name)) ~plain(.(")"))),
-                                                 line=0.5,adj=0.5, side=3, cex=1), 
-              fg=  if(x.rings == "narrow.rings") narrow.cols 
-              else if(x.rings == "wider.rings") wider.cols 
-              else if(x.rings == "none") cols) 
-      
-      # year labels
-      #if(year.labels == TRUE) legend('topright', legend=year[i], bty="n", inset = 0.01, cex=2)
-      if(year.labels == TRUE) title(sub=year[i])
-      
-      Sys.sleep(sys.sleep)
-    }
-  }  
-  
-  # Without animation
-  else {
-    cols <- c(rep(col.inrings, length(x)-1), col.outring)
-    narrow.cols <- c(col.narrow.rings[1:length(x)-1], col.outring) # colors when is selected "narrow.rings"
-    wider.cols <- c(col.wider.rings[1:length(x)-1], col.outring) # colors when is selected "wider.rings"
-    rings.lwd <- c(rep(1, length(x)), 3)
-    #auto.lim <- max(z, na.rm = TRUE) * 2.0
-    if(is.null(xy.lim)) xy.lim <- max(z, na.rm = TRUE) * 1.05
-    
-    symbols( y = y, x = if(length(x) > 0) y else x,
-             circles=z, inches=FALSE, xlim = c(-xy.lim, xy.lim), ylim = c(-xy.lim, xy.lim), 
-             xlab='Width [mm]', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), line=1.5,adj=0.5, 
-                                                    side=3, cex=1.5), sub= if(!is.na(species.name)) mtext(bquote(~plain(.("(")) ~italic(.(species.name)) ~plain(.(")"))),
-                                                                                                          line=0.5,adj=0.5, side=3, cex=1), 
-             fg=  if(x.rings == "narrow.rings") narrow.cols 
-             else if(x.rings == "wider.rings") wider.cols 
-             else if(x.rings == "none") cols)
-    
-    # year labels
-    #if(year.labels == TRUE) legend('topright', legend=paste(range(year)[1], "-", range(year)[2]), bty="n", inset = 0.01, cex=1.2)
-    if(year.labels == TRUE) title(sub=paste(range(year)[1], "-", range(year)[2]))
-    
-  }
-  
-  # saveGIF
-  
-  if (saveGIF == TRUE) {
-    
-    saveGIF({
-      ani.options(interval = sys.sleep, nmax = 50, ani.width = 1000, ani.height = 1000)
-      
-      par(bg="white")
-      
-      # With animation
-      for (i in 1:length(x)) {
-        # Rings
-        cols <-  c(rep(col.inrings, i-1), col.outring) 
-        narrow.cols <- c(col.narrow.rings[1:i-1], col.outring) # colors when is selected "narrow.rings"
-        wider.cols <- c(col.wider.rings[1:i-1], col.outring) # colors when is selected "wider.rings"
-        #auto.lim <- max(z, na.rm = TRUE) * 2.0
-        if(is.null(xy.lim)) xy.lim <- max(z, na.rm = TRUE) * 1.05
-        
-        symbols(y = y[1:i], x = if(length(x) > 0) y[1:i] else x[1:i],
-                circles=z[1:i], inches=FALSE, xlim = c(-xy.lim, xy.lim), ylim = c(-xy.lim, xy.lim), 
-                xlab='Width [mm]', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))),
-                                                       line=1.5,adj=0.5, side=3, cex=1.5), 
-                sub=if(!is.na(species.name)) mtext(bquote(~plain(.("(")) ~italic(.(species.name)) ~plain(.(")"))),
-                                                   line=0.5,adj=0.5, side=3, cex=1), 
-                fg=  if(x.rings == "narrow.rings") narrow.cols 
-                else if(x.rings == "wider.rings") wider.cols 
-                else if(x.rings == "none") cols) 
-        
-        # year labels
-        #if(year.labels == TRUE) legend('topright', legend=year[i], bty="n", inset = 0.01, cex=2)
-        if(year.labels == TRUE) title(sub=year[i])
-      }
-      # AGB changed interval to delay which works under mac. Not sure about windows.
-    }, movie.name = fname)
-  }
-  
-  # Without saving the GIF
-  else {
-    cols <- c(rep(col.inrings, length(x)-1), col.outring)
-    narrow.cols <- c(col.narrow.rings[1:length(x)-1], col.outring) # colors when is selected "narrow.rings"
-    wider.cols <- c(col.wider.rings[1:length(x)-1], col.outring) # colors when is selected "wider.rings"
-    rings.lwd <- c(rep(1, length(x)), 3)
-    # auto.lim <- max(z, na.rm = TRUE) * 2.0
-    if(is.null(xy.lim)) xy.lim <- max(z, na.rm = TRUE) * 1.05
-    
-    symbols( y = y, x = if(length(x) > 0) y else x,
-             circles=z, inches=FALSE, xlim = c(-xy.lim, xy.lim), ylim = c(-xy.lim, xy.lim), 
-             xlab='Width [mm]', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), line=1.5,adj=0.5, 
-                                                    side=3, cex=1.5), sub= if(!is.na(species.name)) mtext(bquote(~plain(.("(")) ~italic(.(species.name)) ~plain(.(")"))),
-                                                                                                          line=0.5,adj=0.5, side=3, cex=1), 
-             fg=  if(x.rings == "narrow.rings") narrow.cols 
-             else if(x.rings == "wider.rings") wider.cols 
-             else if(x.rings == "none") cols)
-    
-    # year labels
-    #if(year.labels == TRUE) legend('topright', legend=paste(range(year)[1], "-", range(year)[2]), bty="n", inset = 0.01, cex=1.2)
-    if(year.labels == TRUE) title(sub=paste(range(year)[1], "-", range(year)[2]))
-  }
-  
-  
-  ## Print Report:  
-  print("Output data:")
-  # print(TRW)  # all data.frame
-  if  ((sum(TRW$trwN, na.rm = TRUE) > 0) & is.na(d2pith[1]))
-    print(paste("Length Radius N:  ", round(sum(TRW$trwN, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  else if  ((sum(TRW$trwN, na.rm = TRUE) > 0) & (d2pith[1] > 0))
-    print(paste("Length Radius N:  ", round(sum(TRW$trwN, d2pith, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  
-  if  ((sum(TRW$trwS, na.rm = TRUE) > 0) & is.na(d2pith[2]))
-    print(paste("Length Radius S:  ", round(sum(TRW$trwS, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  else if  ((sum(TRW$trwS, na.rm = TRUE) > 0) & (d2pith[2] > 0))
-    print(paste("Length Radius S:  ", round(sum(TRW$trwS, d2pith, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  
-  if  ((sum(TRW$trwE, na.rm = TRUE) > 0) & is.na(d2pith[3]))
-    print(paste("Length Radius E:  ", round(sum(TRW$trwE, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  else if  ((sum(TRW$trwE, na.rm = TRUE) > 0) & (d2pith[3] > 0))
-    print(paste("Length Radius E:  ", round(sum(TRW$trwE, d2pith, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  
-  if  ((sum(TRW$trwW, na.rm = TRUE) > 0) & is.na(d2pith[4]))
-    print(paste("Length Radius W:  ", round(sum(TRW$trwW, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  else if  ((sum(TRW$trwW, na.rm = TRUE) > 0) & (d2pith[4] > 0))
-    print(paste("Length Radius W:  ", round(sum(TRW$trwW, d2pith, na.rm = TRUE), digits = 2), sep = " ", "mm"))
-  
-  if (sum(TRW$trw.means, na.rm = TRUE) > 0) 
-    print(paste("Length Diameter:  ", round(sum(TRW$trw.means, na.rm = TRUE) * 2/10, digits = 6), sep = " ", "cm"))
-  
-  if (sum(TRW$bai.ind, na.rm = TRUE) > 0) 
-    print(paste("Basal Area of the disc:  ", round(sum(TRW$bai.ind, na.rm = TRUE)/10^6, digits = 6), sep = " ", "m2"))
-  
-  TRW  
+plotRings <- function(...) {
+  .Defunct(msg = "'plotRings' has been removed from this package and is being developed as its own package")
 }
 

Added: pkg/dplR/man/dplR-defunct.Rd
===================================================================
--- pkg/dplR/man/dplR-defunct.Rd	                        (rev 0)
+++ pkg/dplR/man/dplR-defunct.Rd	2019-02-08 18:56:39 UTC (rev 1139)
@@ -0,0 +1,16 @@
+\encoding{UTF-8}
+\name{dplR-defunct}
+\alias{dplR-defunct}
+\alias{plotRings}
+\title{
+  Defunct functions in dplR
+}
+\description{
+  These are functions no longer included in dplR
+}
+\details{
+  \tabular{ll}{
+    Function: \tab plotRings\cr
+  }
+}
+\keyword{ help }


Property changes on: pkg/dplR/man/dplR-defunct.Rd
___________________________________________________________________
Added: svn:eol-style
   + native

Deleted: pkg/dplR/man/plotRings.Rd
===================================================================
--- pkg/dplR/man/plotRings.Rd	2018-12-13 17:51:52 UTC (rev 1138)
+++ pkg/dplR/man/plotRings.Rd	2019-02-08 18:56:39 UTC (rev 1139)
@@ -1,166 +0,0 @@
-\encoding{UTF-8}
-\name{plotRings}
-\alias{plotRings}
-\title{ Plot Rings }
-\description{
- Make a plot and/or animation of a cross section based on up to four ring-width series. Gives basic summary statistics (e.g. annual basal area, mean ring width) of an approximated stem disc.
-
-}
-\usage{
-plotRings(year, trwN, trwS = NA_real_,
-          trwE = NA_real_, trwW = NA_real_, length.unit = "mm",
-          animation = FALSE, sys.sleep = 0.2, year.labels = FALSE,
-          d2pith = NA, col.inrings = "grey", col.outring = "black",
-          x.rings = "none", col.x.rings = "red", xy.lim = NULL, 
-          species.name = NA, saveGIF = FALSE, fname = "GIF_plotRings.gif")
-}
-\arguments{
-
-  \item{year}{ a \code{numeric} vector giving the years of the 
-  tree-ring records }
-
-  \item{trwN}{ a \code{numeric} vector giving the first tree-ring 
-  series to make the plot. It will be arbitrarily defined as North.  }
-
-  \item{trwS}{ an optional \code{numeric} vector giving a tree-ring 
-  series to make the plot. It will be arbitrarily defined as South 
-  or 180 degrees from \code{\var{trwN}}.  }
-
-  \item{trwE}{ an optional \code{numeric} vector giving a tree-ring 
-  series to make the plot. It will be arbitrarily defined as East or 
-  90 degrees from \code{\var{trwN}}.  }
-
-  \item{trwW}{ an optional \code{numeric} vector giving a tree-ring 
-  series to make the plot. It will be arbitrarily defined as West or 
-  270 degrees from \code{\var{trwN}}.  }
-  
-  \item{animation}{ \code{logical} flag. If \code{TRUE} then each 
-  ring will be individually plotted as an animation within the 
-  R-GUI. A working copy of \dQuote{ImageMagick} is required. See 
-  \sQuote{Details}. }
-  
-  \item{length.unit}{ a \code{character} string to to set the length 
-  unit of ring measurement. Possible values are \code{"mm"}, 
-  \code{"1/10 mm"}, \code{"1/100 mm"} and \code{"1/10 mm"}. }
-  
-  \item{sys.sleep}{ a \code{numeric} value defining the sleep pause
-  in between rings during animation. }
-  
-  \item{year.labels}{ \code{logical} flag. If TRUE the year 
-  labels will be shown at the bottom of the plot.  }
-  
-  \item{d2pith}{ \code{numeric}. The distance from the innermost 
-  ring to the pith of the tree. It is computed in the same 
-  unit as in the \code{"length.unit"} argument. If a value is assigned, 
-  a new row in the output table will be added at the first year}
-
-  \item{col.inrings}{ The color to be used for the interior rings.
-  See section \sQuote{Color Specification} for suitable values.  }
-  
-  \item{col.outring}{ The color to be used for the outer ring.
-  See section \sQuote{Color Specification} for suitable values.  }
-  
-  \item{x.rings}{ a \code{character} string to color narrow and 
-  wider rings of the series. Possible values are \code{"none"}, 
-  \code{"narrow.rings"} to highlight the rings <= quantile 25\%, and 
-  \code{"wider.rings"} to highlight the rings >= quantile 75\%.  }
-  
-  \item{col.x.rings}{ The color to be used for the \code{\var{x.rings}}.
-  See section \sQuote{Color Specification} for suitable values.  }
-  
-  \item{xy.lim}{a \code{numeric} giving a single positive value for the axis limits. If \code{NULL} limits are calculated automatically. See examples.}
-  
-  \item{species.name}{ an optional \code{character} string that 
-  defines the species name in the plot.  }
-
-  \item{saveGIF}{ \code{logical}. If \code{TRUE} a \acronym{GIF} will
-  be saved. A working copy of \dQuote{ImageMagic} is required. 
-  See \sQuote{Details} and examples. }
-
-  \item{fname}{ \code{character}. Filename for \acronym{GIF}. }
-
-
-}
-\details{
-
-This makes a plot, drawing all rings from tree-ring series on a Cartesian plane of up to four cardinal directions (N, S, E, W) defining the eccentricity of the stem. It can be plotted using only data from one ratio, or up to four different radii from same tree. This function can plot each individual ring as an animation within the R-GUI, as a \acronym{GIF}-file, or it can plot all rings at once.
-
-Animations require a functional installation of ImageMagick [\url{https://www.imagemagick.org}] where the ImageMagick program \code{convert} is configured correctly in the \code{PATH}. At the moment, the \code{saveGIF} option in \code{plotRings} is stable but occassionaly fails. Should users encoutner issues saving a \acronym{GIF}, the problem might be related  to the installation of ImageMagick the details of which depend on platform. See \code{\link{saveGIF}} for details.
-
-}
-\value{
-  A \code{data.frame} giving the original data of each tree-ring 
-  series (\code{"trwN"}, \code{"trwS"}, \code{"trwE"}, 
-  \code{"trwW"}), a mean of all tree-ring series (\code{"trw.means"}),
-  cumulative values from \code{"trw.means"} (\code{"trw.acc"}), 
-  the difference of North - South and East - West tree-ring series 
-  (\code{"N_S"}, \code{"E_W"}), the basal area increment of \code{"trw.acc"} 
-  (\code{"bai.acc"}), and the bai for each individual tree ring
-  (\code{"bai.ind"}).
-}
-
-\author{ Code by Darwin Pucha-Cofrep and Jakob Wernicke. Patched and
-improved by Andy Bunn and Mikko Korpela. }
-
-\examples{
-# with tree-ring series from Rothenburg data
-data("anos1")
-
-yrs <- time(anos1)
-# Plot rings with data of two radii from same individual tree
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 species.name = "Cedrela odorata")
-
-# change plot limits                 
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], 
-                 xy.lim = 100)
-
-# Playing with colors
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 col.inrings = "tan", col.outring = "blue") 
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 col.inrings = terrain.colors(nrow(anos1))) 
-
-#Setting the length.unit
-res <- plotRings(yrs,  anos1[,4], trwW = anos1[,5],sp="Cedrela odorata",
-                 length.unit = "mm")
-res <- plotRings(yrs,  anos1[,4], trwW = anos1[,5],sp="Cedrela odorata",
-                 length.unit = "1/100 mm")
-
-# Specifying x.rings highlighting only narrow rings
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 x.rings = "narrow.rings") 
-
-# Highlight and color wide rings
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 x.rings = "wider.rings", col.x.rings = "green") 
-
-\dontrun{
-# Plot rings and animate. Requires ImageMagick to be installed.
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],year.labels = TRUE, 
-                 animation = TRUE, sys.sleep = 0.1)
-                 
-# Plot rings, animate, save as GIF. Requires ImageMagick to be installed.
-res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],
-                 saveGIF = TRUE, fname="GIF_plotRings.gif",sys.sleep = 0.1)
-}
-
-# with four fake tree-ring series 
-trw <- data.frame(trw01.n = abs(rnorm(100, 10, 4)),  # North direction
-                  trw01.s = abs(rnorm(100, 10, 2)),  # South direction
-                  trw01.w = abs(rnorm(100, 10, 2)),  # West direction
-                  trw01.e = abs(rnorm(100, 10, 2)),  # East direction
-                  row.names = 1918:2017)
-class(trw) <- c("rwl","data.frame")
-
-yrs <- time(trw)
-
-# Default plot with 2, 3 and 4 radii
-res <- plotRings(yrs, trw[,1], trw[,2], trw[,3], trw[,4])
-
-# with d2pith values (see the hole before the first rings in the plot)
-res <- plotRings(yrs, trw[,1], trw[,2], trw[,3], trw[,4],
-                 d2pith = 100)
-
-}
-\keyword{ hplot }



More information about the Dplr-commits mailing list