From noreply at r-forge.r-project.org Mon Jan 29 17:17:45 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 17:17:45 +0100 (CET) Subject: [Dplr-commits] r1074 - in pkg/dplR: . R man Message-ID: <20180129161745.53D911862D4@r-forge.r-project.org> Author: andybunn Date: 2018-01-29 17:17:44 +0100 (Mon, 29 Jan 2018) New Revision: 1074 Modified: pkg/dplR/ChangeLog pkg/dplR/R/latexify.R pkg/dplR/man/plotRings.Rd Log: Fixing bug pointed out by Kurt Hornik in latexify.R that caused failure on R-Devel. Fussing with examples in new plotRings function. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2017-11-20 22:45:14 UTC (rev 1073) +++ pkg/dplR/ChangeLog 2018-01-29 16:17:44 UTC (rev 1074) @@ -1,5 +1,10 @@ * CHANGES IN dplR VERSION 1.6.7 +File: latexify.R +---------------- + +- Fixed a bug in latexDate() which was causing failure on R-Devel. + File: plotRings.R ---------------- @@ -8,14 +13,15 @@ File: DESCRIPTION ---------------- -- Added in new authors (Darwin Pucha-Cofrep and Jakob Wernicke), +- Added in new authors (Darwin Pucha-Cofrep and Jakob Wernicke) - Added animation to Imports list - Added gmp to Suggests File: NAMESPACE ---------------- -- Added plotRings to export and importFrom(animation, saveGIF) to support it. +- Added plotRings to export and importFrom(animation, saveGIF) to support it + * CHANGES IN dplR VERSION 1.6.6 File: helpers.R Modified: pkg/dplR/R/latexify.R =================================================================== --- pkg/dplR/R/latexify.R 2017-11-20 22:45:14 UTC (rev 1073) +++ pkg/dplR/R/latexify.R 2018-01-29 16:17:44 UTC (rev 1074) @@ -6,9 +6,9 @@ latexDate <- function(x = Sys.Date(), ...) { ltDate <- as.POSIXlt(x, ...) sprintf("%s %d, %d", - month.name[ltDate[["mon"]] + 1], - ltDate[["mday"]], - 1900 + ltDate[["year"]]) + month.name[ltDate$mon + 1], + ltDate$mday, + 1900 + ltDate$year) } ## Usage: \Sexpr{latexify(string_produced_by_R_code)} Modified: pkg/dplR/man/plotRings.Rd =================================================================== --- pkg/dplR/man/plotRings.Rd 2017-11-20 22:45:14 UTC (rev 1073) +++ pkg/dplR/man/plotRings.Rd 2018-01-29 16:17:44 UTC (rev 1074) @@ -95,33 +95,28 @@ \author{ Code by Darwin Pucha-Cofrep and Jakob Wernicke. Patched and improved by Andy Bunn and Mikko Korpela. } \examples{ - -####### Example 1 # with tree-ring series from Rothenburg data data("anos1") yrs <- as.numeric(rownames(anos1)) # Plot rings with data of two radii from same individual tree -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],sp="Cedrela odorata") -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5],animation=TRUE, sys.sleep=0.1) - -# Playing with colors +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], sp="Cedrela odorata") # Playing with colors res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = "tan", col.outring = "blue") -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1)) ) +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1))) -# x.rings +# Specifying x.rings # highlighting only narrow rings res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'narrow.rings') -# highlighting and coloring only wider rings +# Highlighting and coloring only wider rings res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'wider.rings', col.x.rings = "green") ## Not run +# Plot Rings and animate: +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], animation=TRUE, sys.sleep=0.1) # Plot Rings and save as GIF: res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], saveGIF=TRUE, sys.sleep = 0.1) - -####### Example 1 # with four fake tree-ring series trw <- data.frame (trw01.n = abs(rnorm(100, 10, 7.5)), # North direction trw01.s = abs(rnorm(100, 10, 7.5)), # South direction From noreply at r-forge.r-project.org Mon Jan 29 17:57:26 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 17:57:26 +0100 (CET) Subject: [Dplr-commits] r1075 - pkg/dplR/man Message-ID: <20180129165726.6638E18806A@r-forge.r-project.org> Author: andybunn Date: 2018-01-29 17:57:26 +0100 (Mon, 29 Jan 2018) New Revision: 1075 Modified: pkg/dplR/man/plotRings.Rd Log: typo Modified: pkg/dplR/man/plotRings.Rd =================================================================== --- pkg/dplR/man/plotRings.Rd 2018-01-29 16:17:44 UTC (rev 1074) +++ pkg/dplR/man/plotRings.Rd 2018-01-29 16:57:26 UTC (rev 1075) @@ -6,11 +6,7 @@ Make a plot of a cross section based on up to four ring-width series. } \usage{ -plotRings(year, trwN, trwS = NA, trwE = NA, trwW = NA, -animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, -d2pith = NA, col.rings = "grey", col.outring = "black", -x.rings = "none", col.x.rings = "red", species.name = NA, -saveGIF=FALSE, fname="GIF_plotRings.gif") +plotRings(year, trwN, trwS = NA, trwE = NA, trwW = NA, animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, d2pith = NA, col.rings = "grey", col.outring = "black", x.rings = "none", col.x.rings = "red", species.name = NA, saveGIF=FALSE, fname="GIF_plotRings.gif") } \arguments{ @@ -34,7 +30,7 @@ \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 ``ImageMagic'' is required. See + R-GUI. A working copy of ``ImageMagick'' is required. See \code{Details}. } \item{sys.sleep}{ a \code{numeric} value defining the sleep pause From noreply at r-forge.r-project.org Mon Jan 29 18:02:08 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 18:02:08 +0100 (CET) Subject: [Dplr-commits] r1076 - in pkg/dplR: . man Message-ID: <20180129170208.1F805189839@r-forge.r-project.org> Author: andybunn Date: 2018-01-29 18:02:07 +0100 (Mon, 29 Jan 2018) New Revision: 1076 Modified: pkg/dplR/DESCRIPTION pkg/dplR/man/plotRings.Rd Log: Typo and date in DESCRIPTION Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2018-01-29 16:57:26 UTC (rev 1075) +++ pkg/dplR/DESCRIPTION 2018-01-29 17:02:07 UTC (rev 1076) @@ -3,7 +3,7 @@ Type: Package Title: Dendrochronology Program Library in R Version: 1.6.7 -Date: 2017-11-20 +Date: 2018-01-29 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/man/plotRings.Rd =================================================================== --- pkg/dplR/man/plotRings.Rd 2018-01-29 16:57:26 UTC (rev 1075) +++ pkg/dplR/man/plotRings.Rd 2018-01-29 17:02:07 UTC (rev 1076) @@ -66,12 +66,12 @@ } \details{ -This makes a simple plot drawing all rings from tree-ring series on a +This makes a simple 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 diferent radii from same tree. This function can plot each individual ring as an animation within -your R-GUI, as an GIF-file, or it can plot all rings at once. +the R-GUI, as an GIF-file, or it can plot all rings at once. Animations require a functional installation of of ImageMagick. See \code{\link{saveGIF}} for details. @@ -101,16 +101,15 @@ res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1))) -# Specifying x.rings -# highlighting only narrow rings +# Specifying x.rings highlighting only narrow rings res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'narrow.rings') # Highlighting and coloring only wider rings res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'wider.rings', col.x.rings = "green") ## Not run -# Plot Rings and animate: +# Plot Rings and animate (requires ImageMagick) res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], animation=TRUE, sys.sleep=0.1) -# Plot Rings and save as GIF: +# Plot Rings and save as GIF (requires ImageMagick) res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], saveGIF=TRUE, sys.sleep = 0.1) # with four fake tree-ring series From noreply at r-forge.r-project.org Mon Jan 29 18:29:32 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 18:29:32 +0100 (CET) Subject: [Dplr-commits] r1077 - in pkg/dplR: R man Message-ID: <20180129172932.18EAA1899B6@r-forge.r-project.org> Author: mvkorpel Date: 2018-01-29 18:29:31 +0100 (Mon, 29 Jan 2018) New Revision: 1077 Modified: pkg/dplR/R/wavelet.plot.R pkg/dplR/man/wavelet.plot.Rd Log: Fixed translations in wavelet.plot() Modified: pkg/dplR/R/wavelet.plot.R =================================================================== --- pkg/dplR/R/wavelet.plot.R 2018-01-29 17:02:07 UTC (rev 1076) +++ pkg/dplR/R/wavelet.plot.R 2018-01-29 17:29:31 UTC (rev 1077) @@ -1,10 +1,15 @@ wavelet.plot <- function(wave.list, wavelet.levels = quantile(wave.list$Power, probs=(0:10)/10), - add.coi = TRUE, add.sig = TRUE, x.lab = gettext("Time"), - period.lab = gettext("Period"), crn.lab = gettext("RWI"), + add.coi = TRUE, add.sig = TRUE, + x.lab = gettext("Time", domain = "R-dplR"), + period.lab = gettext("Period", domain = "R-dplR"), + crn.lab = gettext("RWI", domain = "R-dplR"), key.cols = rev(rainbow(length(wavelet.levels)-1)), - key.lab = parse(text = paste0("\"", gettext("Power"), "\"^2")), + key.lab = parse(text = paste0("\"", + gettext("Power", + domain = "R-dplR"), + "\"^2")), add.spline = FALSE, f = 0.5, nyrs = NULL, crn.col = "black", crn.lwd = 1,coi.col='black', crn.ylim = range(wave.list$y) * c(0.95, 1.05), Modified: pkg/dplR/man/wavelet.plot.Rd =================================================================== --- pkg/dplR/man/wavelet.plot.Rd 2018-01-29 17:02:07 UTC (rev 1076) +++ pkg/dplR/man/wavelet.plot.Rd 2018-01-29 17:29:31 UTC (rev 1077) @@ -10,10 +10,15 @@ wavelet.plot(wave.list, wavelet.levels = quantile(wave.list$Power, probs = (0:10)/10), - add.coi = TRUE, add.sig = TRUE, x.lab = gettext("Time"), - period.lab = gettext("Period"), crn.lab = gettext("RWI"), + add.coi = TRUE, add.sig = TRUE, + x.lab = gettext("Time", domain = "R-dplR"), + period.lab = gettext("Period", domain = "R-dplR"), + crn.lab = gettext("RWI", domain = "R-dplR"), key.cols = rev(rainbow(length(wavelet.levels)-1)), - key.lab = parse(text=paste0("\"", gettext("Power"), "\"^2")), + key.lab = parse(text=paste0("\"", + gettext("Power", + domain="R-dplR"), + "\"^2")), add.spline = FALSE, f = 0.5, nyrs = NULL, crn.col = "black", crn.lwd = 1,coi.col='black', crn.ylim = range(wave.list$y) * c(0.95, 1.05), From noreply at r-forge.r-project.org Mon Jan 29 19:11:11 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 19:11:11 +0100 (CET) Subject: [Dplr-commits] r1078 - in pkg/dplR: R man Message-ID: <20180129181111.1520D18806A@r-forge.r-project.org> Author: mvkorpel Date: 2018-01-29 19:11:10 +0100 (Mon, 29 Jan 2018) New Revision: 1078 Modified: pkg/dplR/R/plotRings.R pkg/dplR/man/plotRings.Rd Log: Cleanup Modified: pkg/dplR/R/plotRings.R =================================================================== --- pkg/dplR/R/plotRings.R 2018-01-29 17:29:31 UTC (rev 1077) +++ pkg/dplR/R/plotRings.R 2018-01-29 18:11:10 UTC (rev 1078) @@ -1,11 +1,11 @@ plotRings <- function(year, trwN, trwS = NA, trwE = NA, trwW =NA, - animation = FALSE, sys.sleep = 0.2, - year.labels = TRUE, - d2pith = NA, - col.rings = "grey", col.outring = "black", - x.rings = "none", col.x.rings = "red", - species.name = NA, - saveGIF=FALSE, fname="GIF_plotRings.gif") { + animation = FALSE, sys.sleep = 0.2, + year.labels = TRUE, + d2pith = NA, + col.rings = "grey", col.outring = "black", + x.rings = "none", col.x.rings = "red", + species.name = NA, + saveGIF=FALSE, fname="GIF_plotRings.gif") { ## Creating a data.frame TRW <- data.frame(row.names = year, trwN = trwN, Modified: pkg/dplR/man/plotRings.Rd =================================================================== --- pkg/dplR/man/plotRings.Rd 2018-01-29 17:29:31 UTC (rev 1077) +++ pkg/dplR/man/plotRings.Rd 2018-01-29 18:11:10 UTC (rev 1078) @@ -6,7 +6,11 @@ Make a plot of a cross section based on up to four ring-width series. } \usage{ -plotRings(year, trwN, trwS = NA, trwE = NA, trwW = NA, animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, d2pith = NA, col.rings = "grey", col.outring = "black", x.rings = "none", col.x.rings = "red", species.name = NA, saveGIF=FALSE, fname="GIF_plotRings.gif") +plotRings(year, trwN, trwS = NA, trwE = NA, trwW = NA, + animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, + d2pith = NA, col.rings = "grey", col.outring = "black", + x.rings = "none", col.x.rings = "red", species.name = NA, + saveGIF = FALSE, fname = "GIF_plotRings.gif") } \arguments{ @@ -18,20 +22,20 @@ \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{trwN}. } + 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{trwN}. } + 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{trwN}. } + 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 ``ImageMagick'' is required. See - \code{Details}. } + R-GUI. A working copy of \dQuote{ImageMagick} is required. See + \sQuote{Details}. } \item{sys.sleep}{ a \code{numeric} value defining the sleep pause in between rings during animation. } @@ -43,52 +47,54 @@ ring to the pith of the tree. } \item{col.rings}{ The color to be used for the interior rings. - See section `Color Specification' for suitable values. } + See section \sQuote{Color Specification} for suitable values. } \item{col.outring}{ The color to be used for the outer ring. - See section `Color Specification' for suitable values. } + 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 ``none'', - "narrow.rings" to highlight the rings <= quantile 25\%, and - "wider.rings" to highlight the rings >= quantile 75\%. } + 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{x.rings}. - See section `Color Specification' for suitable values. } + \item{col.x.rings}{ The color to be used for the \code{\var{x.rings}}. + See section \sQuote{Color Specification} for suitable values. } - \item{species.name}{ a optional \code{character} string that - definesthe species name in the plot. } + \item{species.name}{ an optional \code{character} string that + defines the species name in the plot. } - \item{saveGIF}{ \code{logical}. If TRUE a GIF will be saved. } + \item{saveGIF}{ \code{logical}. If \code{TRUE} a \acronym{GIF} will be + saved. } - \item{fname}{ \code{character}. Filename for GIF. } + \item{fname}{ \code{character}. Filename for \acronym{GIF}. } } \details{ This makes a simple plot, drawing all rings from tree-ring series on a -cartesian plane of up to four cardinal directions (N, S, E, W) +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 diferent radii from same tree. +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 an GIF-file, or it can plot all rings at once. +the R-GUI, as a \acronym{GIF}-file, or it can plot all rings at once. -Animations require a functional installation of of ImageMagick. +Animations require a functional installation of ImageMagick. See \code{\link{saveGIF}} for details. } \value{ A \code{data.frame} giving the original data of each tree-ring - series (\code{var{trwN}}, \code{var{trwS}}, \code{var{trwE}}, - \code{var{trwW}}), a mean of all tree-ring series (\code{trw.means}), - cummulative values from \code{trw.means} (\code{trw.acc}), + 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}). + (\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. } +\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 @@ -96,37 +102,48 @@ yrs <- as.numeric(rownames(anos1)) # Plot rings with data of two radii from same individual tree -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], sp="Cedrela odorata") # Playing with colors -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = "tan", col.outring = "blue") +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + species.name = "Cedrela odorata") +# Playing with colors +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + col.rings = "tan", col.outring = "blue") +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + col.rings = terrain.colors(nrow(anos1))) -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], col.rings = terrain.colors(nrow(anos1))) +# Specifying x.rings highlighting only narrow rings +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + x.rings = "narrow.rings") -# Specifying x.rings highlighting only narrow rings -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'narrow.rings') # Highlighting and coloring only wider rings -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], x.rings = 'wider.rings', col.x.rings = "green") +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + x.rings = "wider.rings", col.x.rings = "green") -## Not run +\dontrun{ # Plot Rings and animate (requires ImageMagick) -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], animation=TRUE, sys.sleep=0.1) +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + animation = TRUE, sys.sleep = 0.1) # Plot Rings and save as GIF (requires ImageMagick) -res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], saveGIF=TRUE, sys.sleep = 0.1) +res <- plotRings(yrs, anos1[,4], trwW = anos1[,5], + saveGIF = TRUE, sys.sleep = 0.1) +} # with four fake tree-ring series -trw <- data.frame (trw01.n = abs(rnorm(100, 10, 7.5)), # North direction - trw01.s = abs(rnorm(100, 10, 7.5)), # South direction - trw01.w = abs(rnorm(100, 10, 2.5)), # West direction - trw01.e = abs(rnorm(100, 10, 2.5)), # East direction - row.names = 1918:2017) +trw <- data.frame(trw01.n = abs(rnorm(100, 10, 7.5)), # North direction + trw01.s = abs(rnorm(100, 10, 7.5)), # South direction + trw01.w = abs(rnorm(100, 10, 2.5)), # West direction + trw01.e = abs(rnorm(100, 10, 2.5)), # East direction + row.names = 1918:2017) year <- as.numeric(rownames(trw)) # Default plot with 2, 3 and 4 radii -res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4]) +res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4]) # with d2pith values (see the hole before the first rings in the plot) -res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4], d2pith = 500) -res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4], d2pith = c(200, NA, NA, 50)) +res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4], + d2pith = 500) +res <- plotRings(year, trw[,1], trw[,2], trw[,3], trw[,4], + d2pith = c(200, NA, NA, 50)) } \keyword{ hplot } From noreply at r-forge.r-project.org Mon Jan 29 19:19:46 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 29 Jan 2018 19:19:46 +0100 (CET) Subject: [Dplr-commits] r1079 - in pkg/dplR: R man Message-ID: <20180129181946.D44E8189826@r-forge.r-project.org> Author: mvkorpel Date: 2018-01-29 19:19:46 +0100 (Mon, 29 Jan 2018) New Revision: 1079 Modified: pkg/dplR/R/plotRings.R pkg/dplR/man/plotRings.Rd Log: Fixes Modified: pkg/dplR/R/plotRings.R =================================================================== --- pkg/dplR/R/plotRings.R 2018-01-29 18:11:10 UTC (rev 1078) +++ pkg/dplR/R/plotRings.R 2018-01-29 18:19:46 UTC (rev 1079) @@ -1,4 +1,5 @@ -plotRings <- function(year, trwN, trwS = NA, trwE = NA, trwW =NA, +plotRings <- function(year, trwN, trwS = NA_real_, + trwE = NA_real_, trwW = NA_real_, animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, d2pith = NA, @@ -9,14 +10,14 @@ ## 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) + trwS = trwS, + trwE = trwE, + trwW = trwW) 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 = T) + TRW$trw.means <- rowMeans(TRW, na.rm = TRUE) # Distance to pith (d2pith) # Add d2pith values, @@ -25,7 +26,7 @@ # This code check the NA values of d2pith. If there are NA values # this code do nothing, else sum the individual d2pith values to the # first ring. - if(!is.na(mean(d2pith, na.rm = T))) { + if(!is.na(mean(d2pith, na.rm = TRUE))) { TRW.d2pith <- TRW[,1:4] if(!is.na(d2pith[1])) { TRW.d2pith$trwN[which.min(is.na(TRW.d2pith$trwN))] <- TRW.d2pith$trwN[which.min(is.na(TRW.d2pith$trwN))]+d2pith[1] } @@ -36,7 +37,7 @@ if(!is.na(d2pith[4])) { TRW.d2pith$trwW[which.min(is.na(TRW.d2pith$trwW))] <- TRW.d2pith$trwW[which.min(is.na(TRW.d2pith$trwW))]+d2pith[4] } # add d2pith to the first ring of the trw.means - TRW$trw.means[1] <- rowMeans(TRW.d2pith[1,], na.rm = T) + TRW$trw.means[1] <- rowMeans(TRW.d2pith[1,], na.rm = TRUE) } # Accumulative trw.means @@ -80,7 +81,7 @@ 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" - max.acc <- max(z, na.rm = T) * 2.5 + max.acc <- max(z, na.rm = TRUE) * 2.5 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(-max.acc, max.acc), ylim = c(-max.acc, max.acc), xlab='', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), @@ -106,7 +107,7 @@ 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) - max.acc <- max(z, na.rm = T) * 2.5 + max.acc <- max(z, na.rm = TRUE) * 2.5 symbols( y = y, x = if(length(x) > 0) y else x, circles=z, inches=FALSE, xlim = c(-max.acc, max.acc), ylim = c(-max.acc, max.acc), xlab='', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), line=1.5,adj=0.5, @@ -135,7 +136,7 @@ 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" - max.acc <- max(z, na.rm = T) * 2.5 + max.acc <- max(z, na.rm = TRUE) * 2.5 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(-max.acc, max.acc), ylim = c(-max.acc, max.acc), xlab='', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), @@ -161,7 +162,7 @@ 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) - max.acc <- max(z, na.rm = T) * 2.5 + max.acc <- max(z, na.rm = TRUE) * 2.5 symbols( y = y, x = if(length(x) > 0) y else x, circles=z, inches=FALSE, xlim = c(-max.acc, max.acc), ylim = c(-max.acc, max.acc), xlab='', ylab='Width [mm]', main=mtext(bquote(~bold(.("Annual tree growth"))), line=1.5,adj=0.5, Modified: pkg/dplR/man/plotRings.Rd =================================================================== --- pkg/dplR/man/plotRings.Rd 2018-01-29 18:11:10 UTC (rev 1078) +++ pkg/dplR/man/plotRings.Rd 2018-01-29 18:19:46 UTC (rev 1079) @@ -6,7 +6,8 @@ Make a plot of a cross section based on up to four ring-width series. } \usage{ -plotRings(year, trwN, trwS = NA, trwE = NA, trwW = NA, +plotRings(year, trwN, trwS = NA_real_, + trwE = NA_real_, trwW = NA_real_, animation = FALSE, sys.sleep = 0.2, year.labels = TRUE, d2pith = NA, col.rings = "grey", col.outring = "black", x.rings = "none", col.x.rings = "red", species.name = NA, From noreply at r-forge.r-project.org Tue Jan 30 20:57:31 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 30 Jan 2018 20:57:31 +0100 (CET) Subject: [Dplr-commits] r1080 - in tags: . dplR-1.6.7 Message-ID: <20180130195731.6BBC718973D@r-forge.r-project.org> Author: andybunn Date: 2018-01-30 20:57:30 +0100 (Tue, 30 Jan 2018) New Revision: 1080 Added: tags/dplR-1.6.7/ Log: Tagging release 1.6.7 Property changes on: tags/dplR-1.6.7 ___________________________________________________________________ Added: svn:ignore + dplR-Ex.R svn*.tmp .* *~ .Rproj.user *.Rproj revdep Added: svn:auto-props + *.c = svn:eol-style=LF *.h = svn:eol-style=LF Makefile = svn:eol-style=LF *.po = svn:eol-style=native *.pot = svn:eol-style=native *.R = svn:eol-style=native *.Rd = svn:eol-style=native *.Rnw = svn:eol-style=native *.sty = svn:eol-style=native Added: svn:mergeinfo + /branches/dplR-R-2.15:466-506 /branches/redfit:662-700 From noreply at r-forge.r-project.org Tue Jan 30 20:59:49 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 30 Jan 2018 20:59:49 +0100 (CET) Subject: [Dplr-commits] r1081 - pkg/dplR Message-ID: <20180130195949.9A7631883CB@r-forge.r-project.org> Author: andybunn Date: 2018-01-30 20:59:49 +0100 (Tue, 30 Jan 2018) New Revision: 1081 Modified: pkg/dplR/ChangeLog pkg/dplR/DESCRIPTION Log: New version 1.6.8 set up. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2018-01-30 19:57:30 UTC (rev 1080) +++ pkg/dplR/ChangeLog 2018-01-30 19:59:49 UTC (rev 1081) @@ -1,3 +1,7 @@ +* CHANGES IN dplR VERSION 1.6.8 + +None yet + * CHANGES IN dplR VERSION 1.6.7 File: latexify.R Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2018-01-30 19:57:30 UTC (rev 1080) +++ pkg/dplR/DESCRIPTION 2018-01-30 19:59:49 UTC (rev 1081) @@ -2,8 +2,8 @@ Package: dplR Type: Package Title: Dendrochronology Program Library in R -Version: 1.6.7 -Date: 2018-01-29 +Version: 1.6.8 +Date: 2018-01-30 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", From noreply at r-forge.r-project.org Wed Jan 31 10:22:37 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 31 Jan 2018 10:22:37 +0100 (CET) Subject: [Dplr-commits] r1082 - pkg/dplR/inst Message-ID: <20180131092237.8B89618583A@r-forge.r-project.org> Author: mvkorpel Date: 2018-01-31 10:22:36 +0100 (Wed, 31 Jan 2018) New Revision: 1082 Modified: pkg/dplR/inst/COPYRIGHTS Log: Update copyright for dplR > 1.6.7. Could have done this for 1.6.7 already. Modified: pkg/dplR/inst/COPYRIGHTS =================================================================== --- pkg/dplR/inst/COPYRIGHTS 2018-01-30 19:59:49 UTC (rev 1081) +++ pkg/dplR/inst/COPYRIGHTS 2018-01-31 09:22:36 UTC (rev 1082) @@ -2,6 +2,7 @@ For code contributed by Mikko Korpela: * Copyright (C) Aalto University (code introduced in dplR <= 1.6.4) -* Copyright (C) University of Helsinki (code later than dplR 1.6.4) +* Copyright (C) University of Helsinki (1.6.4 < dplR <= 1.6.7) +* Copyright (C) Mikko Korpela (after dplR 1.6.7) Other code in the package is copyright (C) by the corresponding authors. From noreply at r-forge.r-project.org Wed Jan 31 10:26:46 2018 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 31 Jan 2018 10:26:46 +0100 (CET) Subject: [Dplr-commits] r1083 - pkg/dplR Message-ID: <20180131092646.69589188B58@r-forge.r-project.org> Author: mvkorpel Date: 2018-01-31 10:26:45 +0100 (Wed, 31 Jan 2018) New Revision: 1083 Modified: pkg/dplR/DESCRIPTION Log: copyright part 2 Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2018-01-31 09:22:36 UTC (rev 1082) +++ pkg/dplR/DESCRIPTION 2018-01-31 09:26:45 UTC (rev 1083) @@ -3,10 +3,10 @@ Type: Package Title: Dendrochronology Program Library in R Version: 1.6.8 -Date: 2018-01-30 +Date: 2018-01-31 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", + "Korpela", role = c("aut", "cph", "trl")), person("Franco", "Biondi", role = c("aut", "cph")), person("Filipe", "Campelo", role = c("aut", "cph")), person("Pierre", "M?rian", role = c("aut", "cph")), person("Fares", "Qeadan", role = c("aut", "cph")), @@ -16,7 +16,7 @@ "ctb"), person("Michael", "Schulz", role = "ctb"), person("Darwin", "Pucha-Cofrep", role = c("aut", "cph")), person("Jakob", "Wernicke", role = c("aut", "cph"))) -Author: Andy Bunn [aut, cph, cre, trl], Mikko Korpela [aut, 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] +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 Depends: R (>= 2.15.2)