From noreply at r-forge.r-project.org Tue Mar 1 15:10:38 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 1 Mar 2016 15:10:38 +0100 (CET) Subject: [Dplr-commits] r1010 - in pkg/dplR: . vignettes Message-ID: <20160301141038.19BB71812DA@r-forge.r-project.org> Author: mvkorpel Date: 2016-03-01 15:10:37 +0100 (Tue, 01 Mar 2016) New Revision: 1010 Modified: pkg/dplR/DESCRIPTION pkg/dplR/vignettes/dplR.sty Log: Make the \code macro work when language "nohyphenation" is undefined (recent errors on CRAN Windows machines). Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2016-01-22 17:41:36 UTC (rev 1009) +++ pkg/dplR/DESCRIPTION 2016-03-01 14:10:37 UTC (rev 1010) @@ -3,7 +3,7 @@ Type: Package Title: Dendrochronology Program Library in R Version: 1.6.4 -Date: 2016-01-22 +Date: 2016-03-01 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/vignettes/dplR.sty =================================================================== --- pkg/dplR/vignettes/dplR.sty 2016-01-22 17:41:36 UTC (rev 1009) +++ pkg/dplR/vignettes/dplR.sty 2016-03-01 14:10:37 UTC (rev 1010) @@ -1,7 +1,7 @@ % This file is part of dplR: Dendrochronology Program Library in R. % Written by Andy Bunn and Mikko Korpela. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dplR}[2014/11/20 Package for dplR vignettes] +\ProvidesPackage{dplR}[2016/03/01 Package for dplR vignettes] \RequirePackage{amsmath} \RequirePackage{amssymb} @@ -25,6 +25,13 @@ \newcommand*{\code}[1]{Dummy} % \hyphenrules requires the babel package (>= 3.7e, 2000/01/28) % \hyphenrules is fragile, needs protection -\DeclareRobustCommand*{\code}[1]{\texttt{\hyphenrules{nohyphenation}#1}} +% +% Parts of solution copied from an answer by Enrico Gregorio (egreg) +% at http://tex.stackexchange.com/a/91318 +\makeatletter +\@ifundefined{l at nohyphenation} +{\DeclareRobustCommand*{\code}[1]{\texttt{\language=\@cclv#1}}} +{\DeclareRobustCommand*{\code}[1]{\texttt{\hyphenrules{nohyphenation}#1}}} +\makeatother \endinput From noreply at r-forge.r-project.org Tue Mar 1 15:40:35 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 1 Mar 2016 15:40:35 +0100 (CET) Subject: [Dplr-commits] r1011 - pkg/dplR/vignettes Message-ID: <20160301144035.9739D187C7E@r-forge.r-project.org> Author: mvkorpel Date: 2016-03-01 15:40:35 +0100 (Tue, 01 Mar 2016) New Revision: 1011 Modified: pkg/dplR/vignettes/intro-dplR.Rnw pkg/dplR/vignettes/timeseries-dplR.Rnw pkg/dplR/vignettes/xdate-dplR.Rnw Log: Replaced \begin{figure}[h] with \begin{figure}[ht], a step also implicitly performed by LaTeX when the _here_ placement is not possible. The advantage of this is less clutter on the screen when compiling the .tex. No changes to actual figure placement in the resulting .pdf documents. Modified: pkg/dplR/vignettes/intro-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/intro-dplR.Rnw 2016-03-01 14:10:37 UTC (rev 1010) +++ pkg/dplR/vignettes/intro-dplR.Rnw 2016-03-01 14:40:35 UTC (rev 1011) @@ -117,7 +117,7 @@ <>= plot(ca533, plot.type="spag") @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{intro-dplR-a} \caption{A spaghetti plot of the Campito Mountain ring widths.} @@ -200,7 +200,7 @@ series.rwi <- detrend.series(y = series, y.name = "CAM011", verbose=TRUE) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{intro-dplR-b} \caption{Detrending a single series via multiple methods.} @@ -297,7 +297,7 @@ <>= plot(ca533.crn, add.spline=TRUE, nyrs=20) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{intro-dplR-c} \caption{Campito Mountain chronology with 20-year smoothing spline.} @@ -356,7 +356,7 @@ box() par(def.par) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{intro-dplR-d} \caption{Campito Mountain chronology using an EPS cutoff.} Modified: pkg/dplR/vignettes/timeseries-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/timeseries-dplR.Rnw 2016-03-01 14:10:37 UTC (rev 1010) +++ pkg/dplR/vignettes/timeseries-dplR.Rnw 2016-03-01 14:40:35 UTC (rev 1011) @@ -87,7 +87,7 @@ mean(interseries.cor(co021)[, 1]) plot(co021, plot.type="spag") @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-a} \caption{A spaghetti plot of the Mesa Verde ring widths.} @@ -107,7 +107,7 @@ co021.crn <- chron(co021.rwi, prefix="MES") plot(co021.crn, add.spline=TRUE, nyrs=64) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-b} \caption{The Mesa Verde chronology.} @@ -129,7 +129,7 @@ pacf(dat) par(op) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-c} \caption{ACF and PACF plots of the Mesa Verde chronology.} @@ -218,7 +218,7 @@ @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-d} \caption{Spectra of Mesa Verde chronology using redfit} @@ -241,7 +241,7 @@ siglvl = 0.99) wavelet.plot(out.wave, useRaster=NA) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-e} \caption{Continuous wavelet of the Mesa Verde chronology} @@ -293,7 +293,7 @@ par(op) #reset par } @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-f} \caption{Multiresolution analysis of the Mesa Verde chronology} @@ -337,7 +337,7 @@ box() par(op) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{timeseries-dplR-g} \caption{The Mesa Verde chronology plotted with a variety of splines} Modified: pkg/dplR/vignettes/xdate-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/xdate-dplR.Rnw 2016-03-01 14:10:37 UTC (rev 1010) +++ pkg/dplR/vignettes/xdate-dplR.Rnw 2016-03-01 14:40:35 UTC (rev 1011) @@ -90,7 +90,7 @@ mean(interseries.cor(dat)[, 1]) plot(dat, plot.type="spag") @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-a} \caption{A spaghetti plot of the Mesa Verde ring widths.} @@ -148,7 +148,7 @@ <>= rwl.60 <- corr.rwl.seg(dat, seg.length=60, pcrit=0.01) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-b} \caption{Each 60-year segment of each series in the modified Mesa @@ -168,7 +168,7 @@ seg.60 <- corr.series.seg(rwl=dat, series="643114", seg.length=60) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-c} \caption{Correlations between series \code{643114} and the master chronology are @@ -192,7 +192,7 @@ seg.length=30, bin.floor=50) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-d} \caption{Cross-correlations between series \code{643114} and the master @@ -229,7 +229,7 @@ seg.length=20, bin.floor=0) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-e} \caption{Cross-correlations between series \code{643114} and the master @@ -254,7 +254,7 @@ win.start=1865, win.width=40) @ -\begin{figure}[h] +\begin{figure}[ht] \centering \includegraphics{xdate-dplR-f} \caption{The top panel shows the normalized values for the master chronology From noreply at r-forge.r-project.org Tue Mar 1 22:26:30 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 1 Mar 2016 22:26:30 +0100 (CET) Subject: [Dplr-commits] r1012 - pkg/dplR Message-ID: <20160301212630.9C957187E63@r-forge.r-project.org> Author: andybunn Date: 2016-03-01 22:26:30 +0100 (Tue, 01 Mar 2016) New Revision: 1012 Modified: pkg/dplR/TODO Log: adding to TODO Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-01 14:40:35 UTC (rev 1011) +++ pkg/dplR/TODO 2016-03-01 21:26:30 UTC (rev 1012) @@ -1,3 +1,7 @@ +o[andybunn] Add Friedman super-smoother to detrend.series and its ilk. This + should be trivial using function supsmu() in stats. But it will + require some work on the docs, plotting, etc. + o[andybunn] Recode vignettes into markdown so as to have them on Rpubs? o[mvkorpel] Add option for smooth CI curves from theoretical AR1 in redfit! From noreply at r-forge.r-project.org Wed Mar 2 17:58:03 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 2 Mar 2016 17:58:03 +0100 (CET) Subject: [Dplr-commits] r1013 - in pkg/dplR: . R man Message-ID: <20160302165803.4AFAA187663@r-forge.r-project.org> Author: mvkorpel Date: 2016-03-02 17:58:02 +0100 (Wed, 02 Mar 2016) New Revision: 1013 Modified: pkg/dplR/ChangeLog pkg/dplR/DESCRIPTION pkg/dplR/R/detrend.R pkg/dplR/R/detrend.series.R pkg/dplR/TODO pkg/dplR/man/detrend.Rd pkg/dplR/man/detrend.series.Rd Log: Initial implementation of Friedman's super smoother Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/ChangeLog 2016-03-02 16:58:02 UTC (rev 1013) @@ -34,6 +34,13 @@ -------------------- - wavelet.plot() now passes ... arguments to rasterPlot(). +Files: detrend.R, detrend.series.R +---------------------------------- +- New detrending method "Friedman" is Friedman's super smoother, + implemented in stats::supsmu(). +- When 'return.info' is TRUE, also the "f" parameter of + method="Spline" is returned. + File: DESCRIPTION ----------------- - New Suggested package: Cairo. Used (if available) in Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/DESCRIPTION 2016-03-02 16:58:02 UTC (rev 1013) @@ -3,7 +3,7 @@ Type: Package Title: Dendrochronology Program Library in R Version: 1.6.4 -Date: 2016-03-01 +Date: 2016-03-02 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/detrend.R =================================================================== --- pkg/dplR/R/detrend.R 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/R/detrend.R 2016-03-02 16:58:02 UTC (rev 1013) @@ -1,15 +1,16 @@ `detrend` <- function(rwl, y.name = names(rwl), make.plot = FALSE, - method=c("Spline", "ModNegExp", "Mean", "Ar"), + method=c("Spline", "ModNegExp", "Mean", "Ar", "Friedman"), nyrs = NULL, f = 0.5, pos.slope = FALSE, constrain.modnegexp = c("never", "when.fail", "always"), - verbose = FALSE, return.info = FALSE) + verbose = FALSE, return.info = FALSE, + wt, span = "cv", bass = 0) { stopifnot(identical(make.plot, TRUE) || identical(make.plot, FALSE), identical(pos.slope, FALSE) || identical(pos.slope, TRUE), identical(verbose, TRUE) || identical(verbose, FALSE), identical(return.info, TRUE) || identical(return.info, FALSE)) - known.methods <- c("Spline", "ModNegExp", "Mean", "Ar") + known.methods <- c("Spline", "ModNegExp", "Mean", "Ar", "Friedman") constrain2 <- match.arg(constrain.modnegexp) method2 <- match.arg(arg = method, choices = known.methods, @@ -18,6 +19,15 @@ stop("'rwl' must be a data.frame") rn <- row.names(rwl) + detrend.args <- c(alist(rwl.i), + list(make.plot = FALSE, method = method2, + nyrs = nyrs, f = f, pos.slope = pos.slope, + constrain.modnegexp = constrain2, + verbose = FALSE, return.info = return.info, + span = span, bass = bass)) + if (!missing(wt)) { + detrend.args <- c(detrend.args, list(wt = wt)) + } if(!make.plot && !verbose && ("Spline" %in% method2 || "ModNegExp" %in% method2) && !inherits(try(suppressWarnings(req.it <- @@ -39,14 +49,7 @@ .export=exportFun), { names(rwl.i) <- rn - detrend.series(rwl.i, make.plot=FALSE, - method=method2, - nyrs=nyrs, f=f, - pos.slope=pos.slope, - constrain.modnegexp= - constrain2, - verbose=FALSE, - return.info=return.info) + do.call(detrend.series, detrend.args) }) if (return.info) { @@ -61,13 +64,11 @@ modelStats <- vector(mode = "list", length = n.series) dataStats <- vector(mode = "list", length = n.series) } + detrend.args[1] <- alist(rwl[[i]]) + detrend.args[["verbose"]] <- verbose + detrend.args <- c(detrend.args, alist(y.name = y.name[i])) for (i in seq_len(n.series)) { - fits <- detrend.series(rwl[[i]], y.name=y.name[i], - make.plot=make.plot, - method=method2, nyrs=nyrs, f=f, - pos.slope=pos.slope, - constrain.modnegexp=constrain2, - verbose=verbose, return.info=return.info) + fits <- do.call(detrend.series, detrend.args) if (return.info) { modelStats[[i]] <- fits[[2]] dataStats[[i]] <- fits[[3]] Modified: pkg/dplR/R/detrend.series.R =================================================================== --- pkg/dplR/R/detrend.series.R 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/R/detrend.series.R 2016-03-02 16:58:02 UTC (rev 1013) @@ -1,9 +1,10 @@ `detrend.series` <- function(y, y.name = "", make.plot = TRUE, - method = c("Spline", "ModNegExp", "Mean", "Ar"), + method = c("Spline", "ModNegExp", "Mean", "Ar", "Friedman"), nyrs = NULL, f = 0.5, pos.slope = FALSE, constrain.modnegexp = c("never", "when.fail", "always"), - verbose = FALSE, return.info = FALSE) + verbose = FALSE, return.info = FALSE, + wt, span = "cv", bass = 0) { check.flags(make.plot, pos.slope, verbose, return.info) if (length(y.name) == 0) { @@ -12,11 +13,13 @@ y.name2 <- as.character(y.name)[1] stopifnot(Encoding(y.name2) != "bytes") } - known.methods <- c("Spline", "ModNegExp", "Mean", "Ar") + known.methods <- c("Spline", "ModNegExp", "Mean", "Ar", "Friedman") constrain2 <- match.arg(constrain.modnegexp) method2 <- match.arg(arg = method, choices = known.methods, several.ok = TRUE) + wt.missing <- missing(wt) + wt.description <- NULL if (verbose) { widthOpt <- getOption("width") indentSize <- 1 @@ -28,6 +31,7 @@ collapse = "")) cat(gettext("Verbose output: ", domain="R-dplR"), y.name2, "\n", sep = "") + wt.description <- if (wt.missing) "default" else deparse(wt) opts <- c("make.plot" = make.plot, "method(s)" = deparse(method2), "nyrs" = if (is.null(nyrs)) "NULL" else nyrs, @@ -35,7 +39,10 @@ "pos.slope" = pos.slope, "constrain.modnegexp" = constrain2, "verbose" = verbose, - "return.info" = return.info) + "return.info" = return.info, + "wt" = wt.description, + "span" = span, + "bass" = bass) optNames <- names(opts) optChar <- c(gettext("Options", domain="R-dplR"), paste(str_pad(optNames, @@ -254,7 +261,7 @@ Spline <- rep.int(theMean, nY2) splineStats <- list(method = "Mean", mean = theMean) } else { - splineStats <- list(method = "Spline", nyrs = nyrs2) + splineStats <- list(method = "Spline", nyrs = nyrs2, f = f) } resids$Spline <- y2 / Spline modelStats$Spline <- splineStats @@ -307,6 +314,35 @@ do.ar <- FALSE } + if ("Friedman" %in% method2) { + if (is.null(wt.description)) { + wt.description <- if (wt.missing) "default" else deparse(wt) + } + if (verbose) { + cat("", sepLine, sep = "\n") + cat(indent(c(gettext(c("Detrend by FriedMan's super smoother.", + "Smoother parameters"), domain = "R-dplR"), + paste0("span = ", span, ", bass = ", bass), + paste0("wt = ", wt.description))), + sep = "\n") + } + if (wt.missing) { + Friedman <- supsmu(x = seq_len(nY2), y = y2, span = span, + periodic = FALSE, bass = bass)[["y"]] + } else { + Friedman <- supsmu(x = seq_len(nY2), y = y2, wt = wt, span = span, + periodic = FALSE, bass = bass)[["y"]] + } + resids$Friedman <- y2 / Friedman + modelStats$Friedman <- + list(method = "Friedman", + wt = if (wt.missing) "default" else wt, + span = span, bass = bass) + do.friedman <- TRUE + } else { + do.friedman <- FALSE + } + resids <- data.frame(resids) if (verbose || return.info) { zero.years <- lapply(resids, zeroFun) @@ -337,13 +373,18 @@ if(make.plot){ op <- par(no.readonly=TRUE) on.exit(par(op)) + n.methods <- ncol(resids) par(mar=c(2.1, 2.1, 2.1, 2.1), mgp=c(1.1, 0.1, 0), tcl=0.5, xaxs='i') - mat <- switch(ncol(resids), + if (n.methods > 4) { + par(cex.main = min(1, par("cex.main"))) + } + mat <- switch(n.methods, matrix(c(1,2), nrow=2, ncol=1, byrow=TRUE), matrix(c(1,1,2,3), nrow=2, ncol=2, byrow=TRUE), matrix(c(1,2,3,4), nrow=2, ncol=2, byrow=TRUE), - matrix(c(1,1,2,3,4,5), nrow=3, ncol=2, byrow=TRUE)) + matrix(c(1,1,2,3,4,5), nrow=3, ncol=2, byrow=TRUE), + matrix(c(1,1,1,2,3,4,5,6,0), nrow=3, ncol=3, byrow=TRUE)) layout(mat, widths=rep.int(0.5, ncol(mat)), heights=rep.int(1, nrow(mat))) @@ -354,6 +395,7 @@ if(do.spline) lines(Spline, col="green", lwd=2) if(do.mne) lines(ModNegExp, col="red", lwd=2) if(do.mean) lines(Mean, col="blue", lwd=2) + if(do.friedman) lines(Friedman, col="cyan", lwd=2) if(do.spline){ plot(resids$Spline, type="l", col="green", @@ -387,6 +429,14 @@ abline(h=1) mtext(text="(Not plotted with raw series)",side=3,line=-1,cex=0.75) } + + if (do.friedman) { + plot(resids$Friedman, type="l", col="cyan", + main=gettext("Friedman's Super Smoother", domain="R-dplR"), + xlab=gettext("Age (Yrs)", domain="R-dplR"), + ylab=gettext("RWI", domain="R-dplR")) + abline(h=1) + } } resids2 <- matrix(NA, ncol=ncol(resids), nrow=length(y)) Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/TODO 2016-03-02 16:58:02 UTC (rev 1013) @@ -1,10 +1,10 @@ -o[andybunn] Add Friedman super-smoother to detrend.series and its ilk. This +o [andybunn] Add Friedman super-smoother to detrend.series and its ilk. This should be trivial using function supsmu() in stats. But it will require some work on the docs, plotting, etc. -o[andybunn] Recode vignettes into markdown so as to have them on Rpubs? +o [andybunn] Recode vignettes into markdown so as to have them on Rpubs? -o[mvkorpel] Add option for smooth CI curves from theoretical AR1 in redfit! +o [mvkorpel] Add option for smooth CI curves from theoretical AR1 in redfit! * At the moment, in the crossdating functions where a user wants to compare a series to a master chrnology we calculate the master from a rwl object. @@ -20,7 +20,7 @@ and Treydte, K.S. 2001 A new parameter to evaluate temporal signal strength of tree-ring chronologies. Dendrochronologia, 19 (1), 93-102. -o[andybunn] xskel.cff.plot is a renamed version of skel.cff.plot which has been taken +o [andybunn] xskel.cff.plot is a renamed version of skel.cff.plot which has been taken out of the package. I think. The x preface is to denote its use in crossdating. This function needs to have checks built in that will allow it to be used on rwl and crn objects (for the master). @@ -28,20 +28,28 @@ its own function called xskel.calc in helpers.R _ I will make a version without the ccf plots as well "xskel.plot." -o[mvkorpel] Finish the verbose option for detrend.series and it's bretheren +o [mvkorpel] Finish the verbose option for detrend.series and it's bretheren (e.g., detrend, i.detrend.series, i.detrend). Better yet, should we depricate the i.detrend functions and have "interactive" be an argument to detrend? -o[mvkorpel] Should we use class('rwl) as a way of error checking? +o [mvkorpel] Should we use class('rwl) as a way of error checking? E.g.,when a function has "rwl" as an argument should there be a check: if (!inherits(rwl, "rwl")) { stop('use only with "rwl" objects') - Related: We should have functions is.rwl() and as.rwl() -o[andybunn] Write more vignettes: +o [andybunn] Write more vignettes: - Advanced chronology building (strip.rwl, etc.) +o [mvkorpel] Investigate parallel processing in detrend +- Is it actually any good or is the overhead too large? +- It is possible that the relative benefit of parallel processing has + changed over time. +- Different parallel backends have different performance characteristics. + +- The logic of when to go parallel is a heuristic that can be adjusted. + Modified: pkg/dplR/man/detrend.Rd =================================================================== --- pkg/dplR/man/detrend.Rd 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/man/detrend.Rd 2016-03-02 16:58:02 UTC (rev 1013) @@ -8,10 +8,11 @@ } \usage{ detrend(rwl, y.name = names(rwl), make.plot = FALSE, - method = c("Spline", "ModNegExp", "Mean", "Ar"), nyrs = NULL, - f = 0.5, pos.slope = FALSE, + method = c("Spline", "ModNegExp", "Mean", "Ar", "Friedman"), + nyrs = NULL, f = 0.5, pos.slope = FALSE, constrain.modnegexp = c("never", "when.fail", "always"), - verbose = FALSE, return.info = FALSE) + verbose = FALSE, return.info = FALSE, + wt, span = "cv", bass = 0) } \arguments{ @@ -51,6 +52,15 @@ about models and data will be added to the return value. See \sQuote{Value}. } + \item{wt}{ a \code{numeric} vector of case weights for method + \code{"Friedman"}. The default means equals weights. } + + \item{span}{ a \code{numeric} value controlling method + \code{"Friedman"}, or \code{"cv"} (default) for automatic choice by + cross-validation. See \code{\link{supsmu}}. } + + \item{bass}{ a \code{numeric} value controlling the smoothness of the + fitted curve in method \code{"Friedman"}. See \code{\link{supsmu}}. } } \details{ See \code{\link{detrend.series}} for details on detrending Modified: pkg/dplR/man/detrend.series.Rd =================================================================== --- pkg/dplR/man/detrend.series.Rd 2016-03-01 21:26:30 UTC (rev 1012) +++ pkg/dplR/man/detrend.series.Rd 2016-03-02 16:58:02 UTC (rev 1013) @@ -8,10 +8,11 @@ } \usage{ detrend.series(y, y.name = "", make.plot = TRUE, - method = c("Spline", "ModNegExp", "Mean", "Ar"), + method = c("Spline", "ModNegExp", "Mean", "Ar", "Friedman"), nyrs = NULL, f = 0.5, pos.slope = FALSE, constrain.modnegexp = c("never", "when.fail", "always"), - verbose=FALSE, return.info=FALSE) + verbose = FALSE, return.info = FALSE, + wt, span = "cv", bass = 0) } \arguments{ @@ -55,6 +56,16 @@ about models and data will be added to the return value. See \sQuote{Value}. } + \item{wt}{ a \code{numeric} vector of case weights for method + \code{"Friedman"}. The default means equals weights. } + + \item{span}{ a \code{numeric} value controlling method + \code{"Friedman"}, or \code{"cv"} (default) for automatic choice by + cross-validation. See \code{\link{supsmu}}. } + + \item{bass}{ a \code{numeric} value controlling the smoothness of the + fitted curve in method \code{"Friedman"}. See \code{\link{supsmu}}. } + } \details{ This detrends and standardizes a tree-ring series. The detrending is @@ -114,6 +125,12 @@ user to determine the best detrending method for their data. See the references below for further details on detrending. + + The \code{"Friedman"} approach uses Friedman's \sQuote{super smoother} + as implemented in \code{\link{supsmu}}. The parameters + \code{\var{wt}}, \code{\var{span}} and \code{\var{bass}} can be + adjusted, but \code{\var{periodic}} is always set to \code{FALSE}. + } \value{ From noreply at r-forge.r-project.org Fri Mar 4 18:26:11 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 4 Mar 2016 18:26:11 +0100 (CET) Subject: [Dplr-commits] r1014 - pkg/dplR/man Message-ID: <20160304172611.56DB7186C8C@r-forge.r-project.org> Author: andybunn Date: 2016-03-04 18:26:10 +0100 (Fri, 04 Mar 2016) New Revision: 1014 Modified: pkg/dplR/man/detrend.series.Rd Log: clarifying help fo detrend.series Modified: pkg/dplR/man/detrend.series.Rd =================================================================== --- pkg/dplR/man/detrend.series.Rd 2016-03-02 16:58:02 UTC (rev 1013) +++ pkg/dplR/man/detrend.series.Rd 2016-03-04 17:26:10 UTC (rev 1014) @@ -29,12 +29,14 @@ \code{c("Spline", "ModNegExp", "Mean", "Ar")}. Defaults to using all the available methods.} - \item{nyrs}{ a number giving the rigidity of the smoothing spline, + \item{nyrs}{ a number controlling the smoothness of the + fitted curve in method \code{"Spline"}, defaults to 0.67 of series length if \code{\var{nyrs}} is - \code{NULL}. } + \code{NULL}. See \code{\link{ffcsaps}}.} \item{f}{ a number between 0 and 1 giving the frequency response or - wavelength cutoff. Defaults to 0.5. } + wavelength cutoff in method \code{"Spline"}. Defaults to 0.5. + See \code{\link{ffcsaps}}.} \item{pos.slope}{ a \code{logical} flag. Will allow for a positive slope to be used in method \code{"ModNegExp"}. If \code{FALSE} the @@ -65,7 +67,6 @@ \item{bass}{ a \code{numeric} value controlling the smoothness of the fitted curve in method \code{"Friedman"}. See \code{\link{supsmu}}. } - } \details{ This detrends and standardizes a tree-ring series. The detrending is @@ -219,19 +220,20 @@ data(ca533) series <- ca533[, "CAM011"] names(series) <- rownames(ca533) -# defaults to all four methods +# defaults to all five methods series.rwi <- detrend.series(y = series, y.name = "CAM011", verbose=TRUE) # see plot with three methods series.rwi <- detrend.series(y = series, y.name = "CAM011", - method=c("Spline", "ModNegExp","Mean")) + method=c("Spline", "ModNegExp","Friedman")) # see plot with two methods # interesting to note difference from ~200 to 250 years # in terms of what happens to low frequency growth series.rwi <- detrend.series(y = series, y.name = "CAM011", method=c("Spline", "ModNegExp")) -# see plot with just one method +# see plot with just one method and change the spline +# stiffness to 50 years (which is not neccesarily a good choice!) series.rwi <- detrend.series(y = series, y.name = "CAM011", - method="Spline") + method="Spline",nyrs=50) # note that method "Ar" doesn't get plotted in first panel # since this approach doesn't approximate a growth curve. series.rwi <- detrend.series(y = series, y.name = "CAM011", From noreply at r-forge.r-project.org Fri Mar 4 20:39:19 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 4 Mar 2016 20:39:19 +0100 (CET) Subject: [Dplr-commits] r1015 - pkg/dplR Message-ID: <20160304193919.74B44187288@r-forge.r-project.org> Author: andybunn Date: 2016-03-04 20:39:19 +0100 (Fri, 04 Mar 2016) New Revision: 1015 Modified: pkg/dplR/TODO Log: editing TODO. I'd like to get the NET index done soon. Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-04 17:26:10 UTC (rev 1014) +++ pkg/dplR/TODO 2016-03-04 19:39:19 UTC (rev 1015) @@ -1,7 +1,3 @@ -o [andybunn] Add Friedman super-smoother to detrend.series and its ilk. This - should be trivial using function supsmu() in stats. But it will - require some work on the docs, plotting, etc. - o [andybunn] Recode vignettes into markdown so as to have them on Rpubs? o [mvkorpel] Add option for smooth CI curves from theoretical AR1 in redfit! @@ -42,7 +38,6 @@ o [andybunn] Write more vignettes: - Advanced chronology building (strip.rwl, etc.) - o [mvkorpel] Investigate parallel processing in detrend - Is it actually any good or is the overhead too large? From noreply at r-forge.r-project.org Sun Mar 6 18:26:22 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 6 Mar 2016 18:26:22 +0100 (CET) Subject: [Dplr-commits] r1016 - in pkg/dplR: . data Message-ID: <20160306172623.0F8EE187881@r-forge.r-project.org> Author: andybunn Date: 2016-03-06 18:26:22 +0100 (Sun, 06 Mar 2016) New Revision: 1016 Modified: pkg/dplR/ChangeLog pkg/dplR/data/anos1.rda Log: I noticed a problem with anos1 and C. Zang sent a new file. So that rda is updated. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-04 19:39:19 UTC (rev 1015) +++ pkg/dplR/ChangeLog 2016-03-06 17:26:22 UTC (rev 1016) @@ -7,6 +7,12 @@ File: rasterPlot.R ------------------ +- The anos1 data from Christian Zang had been read into R incorrectly at + some point. AGB noticed negative ring widths in the file and emailed Zang + who sent along a corected anos1.rda file. + +File: rasterPlot.R +------------------ - Added option 'Cairo' to control the preferred bitmap device. FALSE (the default) for png() as before, and TRUE for Cairo() as a new option. If the preferred device is unavailable, Modified: pkg/dplR/data/anos1.rda =================================================================== (Binary files differ) From noreply at r-forge.r-project.org Mon Mar 7 07:47:32 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 7 Mar 2016 07:47:32 +0100 (CET) Subject: [Dplr-commits] r1017 - in pkg/dplR: . data man vignettes Message-ID: <20160307064732.8D628187B15@r-forge.r-project.org> Author: andybunn Date: 2016-03-07 07:47:32 +0100 (Mon, 07 Mar 2016) New Revision: 1017 Added: pkg/dplR/data/wa082.rda pkg/dplR/man/wa082.Rd pkg/dplR/vignettes/chron-dplR.Rnw Modified: pkg/dplR/TODO Log: made a start on a chron building vignette. adding a new rwl data set wa082 as well. Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-06 17:26:22 UTC (rev 1016) +++ pkg/dplR/TODO 2016-03-07 06:47:32 UTC (rev 1017) @@ -12,10 +12,6 @@ data differntly based on its class. -* Calculate the NET index that was proposed by Esper, J., Neuwirth, B. - and Treydte, K.S. 2001 A new parameter to evaluate temporal signal - strength of tree-ring chronologies. Dendrochronologia, 19 (1), 93-102. - o [andybunn] xskel.cff.plot is a renamed version of skel.cff.plot which has been taken out of the package. I think. The x preface is to denote its use in crossdating. This function needs to have checks built in that will allow Added: pkg/dplR/data/wa082.rda =================================================================== (Binary files differ) Property changes on: pkg/dplR/data/wa082.rda ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pkg/dplR/man/wa082.Rd =================================================================== --- pkg/dplR/man/wa082.Rd (rev 0) +++ pkg/dplR/man/wa082.Rd 2016-03-07 06:47:32 UTC (rev 1017) @@ -0,0 +1,27 @@ +\encoding{UTF-8} +\name{wa082} +\docType{data} +\alias{wa082} +\title{Hurricane Ridge, Pacific silver fir} +\description{ + This data set gives the raw ring widths for Pacific silver fir + \emph{Abies amabilis} at Hurricane Ridge in Washington, \acronym{USA}. + There are 23 series. Data set was created using \code{\link{read.rwl}} + and saved to an .rda file using \code{\link{save}}. +} +\usage{data(wa082)} +\format{ + A \code{data.frame} containing 35 tree-ring series in columns and 286 + years in rows. +} +\source{ + International tree-ring data bank, Accessed on 06-March-2016 at + \url{ftp://ftp.ncdc.noaa.gov/pub/data/paleo/treering/measurements/northamerica/usa/wa082.rwl} +} +\references{ + Schweingruber, F. (1983) Hurricane Ridge Data Set. \acronym{IGBP} + \acronym{PAGES}/World Data Center for Paleoclimatology Data + Contribution Series 1983-wa082.RWL. \acronym{NOAA}/\acronym{NCDC} + Paleoclimatology Program, Boulder, Colorado, \acronym{USA}. +} +\keyword{datasets} Added: pkg/dplR/vignettes/chron-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/chron-dplR.Rnw (rev 0) +++ pkg/dplR/vignettes/chron-dplR.Rnw 2016-03-07 06:47:32 UTC (rev 1017) @@ -0,0 +1,238 @@ +% -*- mode: noweb; noweb-default-code-mode: R-mode; -*- +%\VignetteIndexEntry{Chronology Building in dplR} +\documentclass[a4paper,11pt]{article} +\usepackage{dplR} % dplR settings - needs some work +\usepackage[utf8]{inputenx} % R CMD build wants this here, not in dplR.sty +\input{ix-utf8enc.dfu} % more characters supported +\title{Chronology Building in dplR} +\author{Andy Bunn \and Mikko Korpela} +<>= +library(dplR) # latexify(), latexDate() +@ +\hypersetup{ + pdfauthor = {Andy Bunn; Mikko Korpela}, +} +\date{\footnotesize Processed with dplR +\Sexpr{packageDescription("dplR", field="Version")} +in \Sexpr{latexify(R.version.string)} on \Sexpr{latexDate()}} + +\begin{document} +\bibliographystyle{jss} + +\setkeys{Gin}{width=1.0\textwidth} % figure width +\SweaveOpts{concordance=TRUE} +\SweaveOpts{strip.white=true} +\SweaveOpts{include=FALSE} +<>= +options(width=62) # width of paper (number of characters) +options(useFancyQuotes=FALSE) # fancy quotes not included in fixed-width font? +Sys.setenv(LANGUAGE="en") # no translations to languages other than English +@ + +\maketitle + +\begin{abstract} +In this vignette we cover three methods for building chronologies using +stadardized ring widths. +\end{abstract} +\tableofcontents + +\newpage + +\section{Introduction} +\subsection{What Is Covered} +The Dendrochronology Program Library in R (dplR) is a package for +dendrochronologists to handle data processing and analysis. This +document gives an illustration of chronology development in dplR. +\subsection{Citing dplR and R} +The creation of dplR is an act of love. We enjoy writing this software and +helping users. However, neither of us is among the idle rich. Alas. We have +jobs and occasionally have to answer to our betters. There is a nifty +\code{citation} function in R that gives you information on how to best +cite R and, in many cases, its packages. We ask that you please cite dplR +and R appropriately in your work. This way when our department chairs and +deans accuse us of being dilettantes we can point to the use of dplR as a +partial excuse. + +<<>>= +citation() +citation("dplR") +@ + +\section{Data Sets} + +Throughout this vignette we will use the onboard data set \code{wa082} +which gives the raw ring widths for Norway spruce \emph{Picea abies} at +Rothenburg ob der Tauber, Bavaria, Germany. There are 20 series from 10 trees, +spanning 98 years. + +This data comes from Zang's PhD thesis. It is a well-dated ring width data set +and plotted in Figure~\ref{fig:rwl}. Note the summary stats below. +<>= +library(dplR) +data(wa082) +wa082.sum <- summary(wa082) +mean(wa082.sum$year) +mean(wa082.sum$stdev) +mean(wa082.sum$median) +mean(wa082.sum$ar1) +mean(interseries.cor(wa082)[, 1]) +plot(wa082, plot.type="spag",zfac=0.5) +@ +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-a} +\caption{A spaghetti plot of the Norway spruce ring widths.} +\label{fig:rwl} +\end{figure} + +\textbf{By the way, if this is all new to you -- you should +proceed immediately to a good primer on dendrochronology like +\cite{Fritts2001}. This vignette is not intended to teach you about how to do +tree-ring analysis. It is intended to teach you how to use the package.} + +\section{Building Chronologies} +Let us make a few chronologies from the \code{wa082} data after detrending +each series with a spline that has a frequency response of 50\% at a +wavelength of 2/3 of +each series's length. +<>= +wa082.rwi <- detrend(wa082, method="Spline") +@ + + +\subsection{Traditional Chronology} +The simplest way to make a chronology in `dplR` is chronology is with the `crn` +function which also has a `plot` method. This defaults to building a mean-value +chronology by averaging the rows of the `rwi` data using Tukey's biweight robust +mean. The result is plotted in Figure~\ref{fig:crn.plot}. +<>= +wa082.crn <- chron(wa082.rwi, prefix="HUR") +plot(wa082.crn, add.spline=TRUE, nyrs=10) +@ +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-c} +\caption{The `wa082` chronology.} +\label{fig:crn.plot} +\end{figure} +Note that the `chron` function will also compute a residual chronology by +"prewhitening" the series before averaging. If the `prewhiten` flag is +set to `TRUE`, each series is whitened using `ar` prior to averaging. The +residual chronology is thus white noise and has no autocorrelation. Note that +the `wa082.std.resid` object has two columns with chronologies as well as the sample +depth in a third column. The result is plotted in +Figure~\ref{fig:crn.plot.resid}. +<>= +wa082.std.resid <- chron(wa082.rwi, prefix="HUR",prewhiten = TRUE) +tail(wa082.std.resid) +plot(wa082.std.resid, add.spline=TRUE, nyrs=10) +@ +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-d} +\caption{The `wa082` chronology as the standard chronology and the residual +chronology.} +\label{fig:crn.plot.resid} +\end{figure} + +\subsection{Using a Cutoff} +A relatively simple addition to the traditional chronology is to truncate the +chronology when the sample depth gets to a certain threshold. The output from +the `chron` function contains a column called `samp.depth` which shows the +number of series that are average for a particular year. We can use the +`subset` function to modify the chronology. The result is plotted in +Figure~\ref{fig:crn.plot.sd}. + +<>= +head(wa082.crn) +wa082.trunc <- subset(wa082.crn, samp.depth > 5) +# and plot +plot(wa082.trunc,add.spline=T,nyrs=10) +@ + +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-e} +\caption{The `wa082` chronology truncated by sample depth.} +\label{fig:crn.plot.sd} +\end{figure} + +A more interesting and likely more robust approach is to truncate via the +expressed population signal (EPS).The result is plotted in +Figure~\ref{fig:crn.plot.eps}. + +<>= +wa082.ids <- autoread.ids(wa082) +eps.cut <- 0.75 # An arbitrary EPS cutoff for demonstration +foo <- rwi.stats.running(wa082.rwi, wa082.ids, window.length = 32) +yrs <- as.numeric(rownames(wa082.crn)) +bar <- data.frame(yrs = c(min(yrs), foo$mid.year, max(yrs)), + eps = c(NA, foo$eps, NA)) +op <- par(no.readonly=TRUE) +par(mar = c(2, 2, 2, 2), mgp = c(1.1, 0.1, 0), tcl = 0.25, + mfcol = c(2, 1), xaxs='i') +plot(yrs, wa082.crn[, 1], type = "n", xlab = "Year", + ylab = "RWI", axes=FALSE) +cutoff <- max(bar$yrs[bar$eps < eps.cut], na.rm = TRUE) +xx <- c(500, 500, cutoff, cutoff) +yy <- c(-1, 3, 3, -1) +polygon(xx, yy, col = "grey80") +abline(h = 1, lwd = 1.5) +lines(yrs, wa082.crn[, 1], col = "grey50") +lines(yrs, ffcsaps(wa082.crn[, 1], nyrs = 32), col = "red", lwd = 2) +axis(1); axis(2); axis(3); +par(new = TRUE) +## Add EPS +plot(bar$yrs, bar$eps, type = "b", xlab = "", ylab = "", + axes = FALSE, pch = 20, col = "blue") +axis(4, at = pretty(foo$eps)) +mtext("EPS", side = 4, line = 1.1) +box() +## Second plot is the chronology after the cutoff only +## Chronology is rebuilt using just years after cutoff but +## that difference is essentially nil. +yr.mask <- yrs > cutoff +yrs2 <- yrs[yr.mask] +wa082.crn2 <- chron(wa082.rwi[yr.mask, ]) +plot(yrs2, wa082.crn2[, 1], type = "n", + xlab = "Year", ylab = "RWI", axes=FALSE) +abline(h = 1, lwd = 1.5) +lines(yrs2, wa082.crn2[, 1], col = "grey50") +lines(yrs2, ffcsaps(wa082.crn2[, 1], nyrs = 32), + col = "red", lwd = 2) +axis(1); axis(2); axis(3); axis(4) +box() +par(op) +@ + +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-f} +\caption{The `wa082` chronology truncated by EPS.} +\label{fig:crn.plot.eps} +\end{figure} + +\subsection{Stripping out series by EPS} + +<>= +wa082.strip.rwl <- strip.rwl(wa082, ids = wa082.ids) +wa082.rwi.strip <- detrend(wa082.strip.rwl, method="Spline") +wa082.crn.strip <- chron(wa082.rwi.strip, prefix = "HUR") +plot(wa082.crn.strip) +@ + +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-f} +\caption{The `wa082` chronology after stripping series with low EPS.} +\label{fig:crn.plot.strip} +\end{figure} + +\section{Conclusion} +There are dozens of packages in R that to do time series analysis. Here, +we've tried to give just a few examples of doing work with dplR while +showing you how you might harness the awesome power of R. +\bibliography{dplR} + +\end{document} From noreply at r-forge.r-project.org Mon Mar 7 07:50:02 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 7 Mar 2016 07:50:02 +0100 (CET) Subject: [Dplr-commits] r1018 - pkg/dplR/man Message-ID: <20160307065002.E52C11874F7@r-forge.r-project.org> Author: andybunn Date: 2016-03-07 07:50:02 +0100 (Mon, 07 Mar 2016) New Revision: 1018 Modified: pkg/dplR/man/wa082.Rd Log: typo Modified: pkg/dplR/man/wa082.Rd =================================================================== --- pkg/dplR/man/wa082.Rd 2016-03-07 06:47:32 UTC (rev 1017) +++ pkg/dplR/man/wa082.Rd 2016-03-07 06:50:02 UTC (rev 1018) @@ -11,7 +11,7 @@ } \usage{data(wa082)} \format{ - A \code{data.frame} containing 35 tree-ring series in columns and 286 + A \code{data.frame} containing 23 tree-ring series in columns and 286 years in rows. } \source{ From noreply at r-forge.r-project.org Mon Mar 7 09:14:07 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 7 Mar 2016 09:14:07 +0100 (CET) Subject: [Dplr-commits] r1019 - pkg/dplR Message-ID: <20160307081408.10A401808DF@r-forge.r-project.org> Author: mvkorpel Date: 2016-03-07 09:14:07 +0100 (Mon, 07 Mar 2016) New Revision: 1019 Modified: pkg/dplR/ChangeLog pkg/dplR/DESCRIPTION Log: A little typo Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-07 06:50:02 UTC (rev 1018) +++ pkg/dplR/ChangeLog 2016-03-07 08:14:07 UTC (rev 1019) @@ -9,7 +9,7 @@ ------------------ - The anos1 data from Christian Zang had been read into R incorrectly at some point. AGB noticed negative ring widths in the file and emailed Zang - who sent along a corected anos1.rda file. + who sent along a corrected anos1.rda file. File: rasterPlot.R ------------------ Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2016-03-07 06:50:02 UTC (rev 1018) +++ pkg/dplR/DESCRIPTION 2016-03-07 08:14:07 UTC (rev 1019) @@ -3,7 +3,7 @@ Type: Package Title: Dendrochronology Program Library in R Version: 1.6.4 -Date: 2016-03-02 +Date: 2016-03-07 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 Tue Mar 8 21:07:43 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 8 Mar 2016 21:07:43 +0100 (CET) Subject: [Dplr-commits] r1020 - in pkg/dplR: . vignettes Message-ID: <20160308200743.A7A66186180@r-forge.r-project.org> Author: andybunn Date: 2016-03-08 21:07:43 +0100 (Tue, 08 Mar 2016) New Revision: 1020 Modified: pkg/dplR/ChangeLog pkg/dplR/TODO pkg/dplR/vignettes/chron-dplR.Rnw pkg/dplR/vignettes/dplR.bib Log: Edits to new vignette on chonology building. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-07 08:14:07 UTC (rev 1019) +++ pkg/dplR/ChangeLog 2016-03-08 20:07:43 UTC (rev 1020) @@ -5,8 +5,12 @@ - Version number requirement for matrixStats is now (>= 0.50.0). -File: rasterPlot.R +File: chron-dplR-Rnw ------------------ +- A new vignette for chronology building + +File: anos1.Rda +------------------ - The anos1 data from Christian Zang had been read into R incorrectly at some point. AGB noticed negative ring widths in the file and emailed Zang who sent along a corrected anos1.rda file. Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-07 08:14:07 UTC (rev 1019) +++ pkg/dplR/TODO 2016-03-08 20:07:43 UTC (rev 1020) @@ -11,7 +11,6 @@ of the argument from rwl to just "data" might be the best option and handle data differntly based on its class. - o [andybunn] xskel.cff.plot is a renamed version of skel.cff.plot which has been taken out of the package. I think. The x preface is to denote its use in crossdating. This function needs to have checks built in that will allow @@ -32,7 +31,7 @@ - Related: We should have functions is.rwl() and as.rwl() o [andybunn] Write more vignettes: -- Advanced chronology building (strip.rwl, etc.) +- Detrending o [mvkorpel] Investigate parallel processing in detrend - Is it actually any good or is the overhead too large? Modified: pkg/dplR/vignettes/chron-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/chron-dplR.Rnw 2016-03-07 08:14:07 UTC (rev 1019) +++ pkg/dplR/vignettes/chron-dplR.Rnw 2016-03-08 20:07:43 UTC (rev 1020) @@ -60,14 +60,10 @@ @ \section{Data Sets} - Throughout this vignette we will use the onboard data set \code{wa082} -which gives the raw ring widths for Norway spruce \emph{Picea abies} at -Rothenburg ob der Tauber, Bavaria, Germany. There are 20 series from 10 trees, -spanning 98 years. - -This data comes from Zang's PhD thesis. It is a well-dated ring width data set -and plotted in Figure~\ref{fig:rwl}. Note the summary stats below. +which gives the raw ring widths for Pacific silver fir \emph{Abies amabilis} +at Hurricane Ridge in Washington, USA. There are 23 series covering 286 years. +The data are plotted in Figure~\ref{fig:rwl}. Note the summary stats below. <>= library(dplR) data(wa082) @@ -77,12 +73,12 @@ mean(wa082.sum$median) mean(wa082.sum$ar1) mean(interseries.cor(wa082)[, 1]) -plot(wa082, plot.type="spag",zfac=0.5) +plot(wa082, plot.type="spag") @ \begin{figure}[ht] \centering \includegraphics{chron-dplR-a} -\caption{A spaghetti plot of the Norway spruce ring widths.} +\caption{A spaghetti plot of the Pacific silver fir ring widths.} \label{fig:rwl} \end{figure} @@ -94,44 +90,46 @@ \section{Building Chronologies} Let us make a few chronologies from the \code{wa082} data after detrending each series with a spline that has a frequency response of 50\% at a -wavelength of 2/3 of -each series's length. +wavelength of 2/3 of each series's length. <>= wa082.rwi <- detrend(wa082, method="Spline") @ \subsection{Traditional Chronology} -The simplest way to make a chronology in `dplR` is chronology is with the `crn` -function which also has a `plot` method. This defaults to building a mean-value -chronology by averaging the rows of the `rwi` data using Tukey's biweight robust -mean. The result is plotted in Figure~\ref{fig:crn.plot}. +The simplest way to make a chronology in \code{dplR} is chronology is with the \code{crn} +function which also has a \code{plot} method. This defaults to building a mean-value +chronology by averaging the rows of the \code{rwi} data using Tukey's biweight robust +mean. The result is plotted in Figure~\ref{fig:crn.plot} with a 30-year +smoothing spline. <>= wa082.crn <- chron(wa082.rwi, prefix="HUR") -plot(wa082.crn, add.spline=TRUE, nyrs=10) +tail(wa082.crn) +plot(wa082.crn, add.spline=TRUE, nyrs=30) @ \begin{figure}[ht] \centering \includegraphics{chron-dplR-c} -\caption{The `wa082` chronology.} +\caption{The \code{wa082} chronology.} \label{fig:crn.plot} \end{figure} -Note that the `chron` function will also compute a residual chronology by -"prewhitening" the series before averaging. If the `prewhiten` flag is -set to `TRUE`, each series is whitened using `ar` prior to averaging. The + +Note that the \code{chron} function will also compute a residual chronology by +"prewhitening" the series before averaging. If the \code{prewhiten} flag is +set to \code{TRUE}, each series is whitened using \code{ar} prior to averaging. The residual chronology is thus white noise and has no autocorrelation. Note that -the `wa082.std.resid` object has two columns with chronologies as well as the sample +the \code{wa082.std.resid} object has two columns with chronologies as well as the sample depth in a third column. The result is plotted in -Figure~\ref{fig:crn.plot.resid}. +Figure~\ref{fig:crn.plot.resid}. <>= wa082.std.resid <- chron(wa082.rwi, prefix="HUR",prewhiten = TRUE) tail(wa082.std.resid) -plot(wa082.std.resid, add.spline=TRUE, nyrs=10) +plot(wa082.std.resid, add.spline=TRUE, nyrs=30) @ \begin{figure}[ht] \centering \includegraphics{chron-dplR-d} -\caption{The `wa082` chronology as the standard chronology and the residual +\caption{The \code{wa082} chronology as the standard chronology and the residual chronology.} \label{fig:crn.plot.resid} \end{figure} @@ -139,36 +137,36 @@ \subsection{Using a Cutoff} A relatively simple addition to the traditional chronology is to truncate the chronology when the sample depth gets to a certain threshold. The output from -the `chron` function contains a column called `samp.depth` which shows the +the \code{chron} function contains a column called \code{samp.depth} which shows the number of series that are average for a particular year. We can use the -`subset` function to modify the chronology. The result is plotted in +\code{subset} function to modify the chronology. The result is plotted in Figure~\ref{fig:crn.plot.sd}. <>= head(wa082.crn) wa082.trunc <- subset(wa082.crn, samp.depth > 5) # and plot -plot(wa082.trunc,add.spline=T,nyrs=10) +plot(wa082.trunc,add.spline=T,nyrs=30) @ \begin{figure}[ht] \centering \includegraphics{chron-dplR-e} -\caption{The `wa082` chronology truncated by sample depth.} +\caption{The \code{wa082} chronology truncated by sample depth.} \label{fig:crn.plot.sd} \end{figure} A more interesting and likely more robust approach is to truncate via the -expressed population signal (EPS).The result is plotted in +expressed population signal (EPS). The result is plotted in Figure~\ref{fig:crn.plot.eps}. <>= wa082.ids <- autoread.ids(wa082) eps.cut <- 0.75 # An arbitrary EPS cutoff for demonstration -foo <- rwi.stats.running(wa082.rwi, wa082.ids, window.length = 32) +wa082.rwi.stats <- rwi.stats.running(wa082.rwi, wa082.ids, window.length = 30) yrs <- as.numeric(rownames(wa082.crn)) -bar <- data.frame(yrs = c(min(yrs), foo$mid.year, max(yrs)), - eps = c(NA, foo$eps, NA)) +bar <- data.frame(yrs = c(min(yrs), wa082.rwi.stats$mid.year, max(yrs)), + eps = c(NA, wa082.rwi.stats$eps, NA)) op <- par(no.readonly=TRUE) par(mar = c(2, 2, 2, 2), mgp = c(1.1, 0.1, 0), tcl = 0.25, mfcol = c(2, 1), xaxs='i') @@ -180,13 +178,13 @@ polygon(xx, yy, col = "grey80") abline(h = 1, lwd = 1.5) lines(yrs, wa082.crn[, 1], col = "grey50") -lines(yrs, ffcsaps(wa082.crn[, 1], nyrs = 32), col = "red", lwd = 2) +lines(yrs, ffcsaps(wa082.crn[, 1], nyrs = 30), col = "red", lwd = 2) axis(1); axis(2); axis(3); par(new = TRUE) ## Add EPS plot(bar$yrs, bar$eps, type = "b", xlab = "", ylab = "", axes = FALSE, pch = 20, col = "blue") -axis(4, at = pretty(foo$eps)) +axis(4, at = pretty(wa082.rwi.stats$eps)) mtext("EPS", side = 4, line = 1.1) box() ## Second plot is the chronology after the cutoff only @@ -194,12 +192,13 @@ ## that difference is essentially nil. yr.mask <- yrs > cutoff yrs2 <- yrs[yr.mask] -wa082.crn2 <- chron(wa082.rwi[yr.mask, ]) -plot(yrs2, wa082.crn2[, 1], type = "n", +wa082.rwi2 <- wa082.rwi[yr.mask, ] +wa082.crn.eps <- chron(wa082.rwi2) +plot(yrs2, wa082.crn.eps[, 1], type = "n", xlab = "Year", ylab = "RWI", axes=FALSE) abline(h = 1, lwd = 1.5) -lines(yrs2, wa082.crn2[, 1], col = "grey50") -lines(yrs2, ffcsaps(wa082.crn2[, 1], nyrs = 32), +lines(yrs2, wa082.crn.eps[, 1], col = "grey50") +lines(yrs2, ffcsaps(wa082.crn.eps[, 1], nyrs = 30), col = "red", lwd = 2) axis(1); axis(2); axis(3); axis(4) box() @@ -209,30 +208,85 @@ \begin{figure}[ht] \centering \includegraphics{chron-dplR-f} -\caption{The `wa082` chronology truncated by EPS.} +\caption{The \code{wa082} chronology truncated by EPS.} \label{fig:crn.plot.eps} \end{figure} +\subsection{Chronology uncertainty} +Typically we calculate a chronology by taking the average of each year from +the \code{rwi} object. (And that is typically the biweight robust mean.) The function +\code{chron} like pretty much all the functions in \code{dplR} are realtively simple +chunks of code that are used for convenience. We can make our own chronology +and get the mean plus two standard error of the yearly growth +(Figure~\ref{fig:crn.plot.se}). Don't +get stuck in just using the prepackaged functions in \code{dplR}! + +<>= +wa082.avg <- apply(wa082.rwi2,1,mean,na.rm=TRUE) +se <- function(x){ + x2 <- na.omit(x) + n <- length(x2) + sd(x2)/sqrt(n) +} +wa082.se <- apply(wa082.rwi2,1,se) +wa082.sd <- apply(wa082.rwi2,1,sd,na.rm=TRUE) + +par(mar = c(2, 2, 2, 2), mgp = c(1.1, 0.1, 0), tcl = 0.25, xaxs='i') +plot(yrs2, wa082.avg, type = "n",ylim=c(0.5,1.6), + xlab = "Year", ylab = "RWI", axes=FALSE) +abline(h = 1, lwd = 1.5) +xx <- c(yrs2,rev(yrs2)) +yy <- c(wa082.avg+wa082.se*2,rev(wa082.avg-wa082.se*2)) +polygon(xx,yy,col="grey80",border = NA) +lines(yrs2, wa082.avg, col = "black") +lines(yrs2, ffcsaps(wa082.avg, nyrs = 30), + col = "red", lwd = 2) +legend(x=1800,y=0.75,legend=c("Mean","2 SE", "30-yr Spline"), + lwd=c(1,10,1), col=c("black","grey","red"), + bg = "white") +axis(1); axis(2); axis(3); axis(4) +box() +par(op) +@ + +\begin{figure}[ht] +\centering +\includegraphics{chron-dplR-g} +\caption{The \code{wa082} chronology with two standard errors.} +\label{fig:crn.plot.se} +\end{figure} + \subsection{Stripping out series by EPS} +We want to introduce one other approach that doesn't deal explicitly with +chronology building but can be used to build a better chronology. The +\code{strip.rwl} function uses EPS-based chronology stripping \cite{Fowler2003} +where each series is assessed to see if its inclusion in the chronology +improves the EPS. If it does not the series is dropped from the \code{rwl} object. +As we will see in this example two series are excluded which causes a modest +improvement in EPS (Figure~\ref{fig:crn.plot.strip}). -<>= +<>= wa082.strip.rwl <- strip.rwl(wa082, ids = wa082.ids) wa082.rwi.strip <- detrend(wa082.strip.rwl, method="Spline") wa082.crn.strip <- chron(wa082.rwi.strip, prefix = "HUR") -plot(wa082.crn.strip) +wa082.crn.strip <- subset(wa082.crn.strip, samp.depth > 5) +plot(wa082.crn.strip,add.spline=TRUE,nyrs=30) @ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-f} -\caption{The `wa082` chronology after stripping series with low EPS.} +\includegraphics{chron-dplR-h} +\caption{The \code{wa082} chronology after stripping series with low EPS.} \label{fig:crn.plot.strip} \end{figure} \section{Conclusion} -There are dozens of packages in R that to do time series analysis. Here, -we've tried to give just a few examples of doing work with dplR while -showing you how you might harness the awesome power of R. +We have tried to introduce a few ways of building chronologies with \code{dplR} that +are either typical (like truncating by sample depth) or less commmonly used. +Again, we feel that it is important to reiterate that the advantage of using +\code{dplR} is that it gets the analyst to use \code{R} and thus have access to the +essentailly limitless tool that it provides. Go foRth! + \bibliography{dplR} \end{document} Modified: pkg/dplR/vignettes/dplR.bib =================================================================== --- pkg/dplR/vignettes/dplR.bib 2016-03-07 08:14:07 UTC (rev 1019) +++ pkg/dplR/vignettes/dplR.bib 2016-03-08 20:07:43 UTC (rev 1020) @@ -70,6 +70,22 @@ title = {{Tree-Ring Standardization and Growth-Trend Estimation}}, year = {1990} } + at article{Fowler2003, +abstract = {Replication is a key principle in tree-ring research. Dendrochronologists strive to maximise sample size to enhance the "signal" in tree-ring chronologies, often relying on crossdating to provide an effective quality control filter. However, is crossdating alone a sufficient quality test for incorporating a series into a site chronology? We address this question using an objective and automated "chronology stripping" method designed to maximise the chronology's "Expressed Population Signal" (EPS), by iteratively removing series which lower chronology EPS. A 15-site data set of Agathis australis (D. Don) Lindley is used to demonstrate the method. Results suggest that modest benefits may be gained by chronology stripping, but the quality control implicit in crossdating is indeed effective, at least for Agathis australis.}, +author = {Fowler, Anthony and Boswijk, Gretel}, +journal = {Tree-Ring Research}, +keywords = {Agathis Australis,Dendrochronology,Expressed Population Signal,Kauri,New Zealand,Tree Rings}, +language = {en\_US}, +mendeley-groups = {BunnHughesERL}, +number = {2}, +pages = {53--62}, +publisher = {Tree-Ring Society}, +title = {{Chronology stripping as a tool for enhancing the statistical quality of tree-ring chronologies}}, +url = {http://arizona.openrepository.com/arizona/handle/10150/262571?mode=full}, +volume = {59}, +year = {2003} +} + @book{Fritts2001, author = {Fritts, H. C.}, isbn = {1930665393}, From noreply at r-forge.r-project.org Tue Mar 15 01:02:45 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 15 Mar 2016 01:02:45 +0100 (CET) Subject: [Dplr-commits] r1021 - in pkg/dplR: . vignettes Message-ID: <20160315000245.CFFEE18806A@r-forge.r-project.org> Author: andybunn Date: 2016-03-15 01:02:44 +0100 (Tue, 15 Mar 2016) New Revision: 1021 Modified: pkg/dplR/ChangeLog pkg/dplR/vignettes/chron-dplR.Rnw Log: Some vignette edits. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-08 20:07:43 UTC (rev 1020) +++ pkg/dplR/ChangeLog 2016-03-15 00:02:44 UTC (rev 1021) @@ -7,7 +7,8 @@ File: chron-dplR-Rnw ------------------ -- A new vignette for chronology building +- A new vignette for chronology building. This is pretty rough and could +use some expanding. File: anos1.Rda ------------------ Modified: pkg/dplR/vignettes/chron-dplR.Rnw =================================================================== --- pkg/dplR/vignettes/chron-dplR.Rnw 2016-03-08 20:07:43 UTC (rev 1020) +++ pkg/dplR/vignettes/chron-dplR.Rnw 2016-03-15 00:02:44 UTC (rev 1021) @@ -32,8 +32,8 @@ \maketitle \begin{abstract} -In this vignette we cover three methods for building chronologies using -stadardized ring widths. +In this vignette we cover methods for building mean-value chronologies using +standardized ring widths. \end{abstract} \tableofcontents @@ -54,7 +54,7 @@ deans accuse us of being dilettantes we can point to the use of dplR as a partial excuse. -<<>>= +<>= citation() citation("dplR") @ @@ -64,7 +64,7 @@ which gives the raw ring widths for Pacific silver fir \emph{Abies amabilis} at Hurricane Ridge in Washington, USA. There are 23 series covering 286 years. The data are plotted in Figure~\ref{fig:rwl}. Note the summary stats below. -<>= +<>= library(dplR) data(wa082) wa082.sum <- summary(wa082) @@ -77,7 +77,7 @@ @ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-a} +\includegraphics{chron-dplR-b} \caption{A spaghetti plot of the Pacific silver fir ring widths.} \label{fig:rwl} \end{figure} @@ -90,8 +90,12 @@ \section{Building Chronologies} Let us make a few chronologies from the \code{wa082} data after detrending each series with a spline that has a frequency response of 50\% at a -wavelength of 2/3 of each series's length. -<>= +wavelength of 2/3 of each series's length. Detrending is an enormously complicated +area unto itself. We use a spline here but could standardize by several other +methods and likely get results that look quite different. There is a reason, +after all, that dendrochronologists have been arguing about detrending for decades. + +<>= wa082.rwi <- detrend(wa082, method="Spline") @ @@ -100,35 +104,34 @@ The simplest way to make a chronology in \code{dplR} is chronology is with the \code{crn} function which also has a \code{plot} method. This defaults to building a mean-value chronology by averaging the rows of the \code{rwi} data using Tukey's biweight robust -mean. The result is plotted in Figure~\ref{fig:crn.plot} with a 30-year -smoothing spline. -<>= +mean (function \code{tbrm} in \code{dplR}). The result is plotted in Figure~\ref{fig:crn.plot} with a 30-year smoothing spline for visualization. +<>= wa082.crn <- chron(wa082.rwi, prefix="HUR") tail(wa082.crn) plot(wa082.crn, add.spline=TRUE, nyrs=30) @ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-c} +\includegraphics{chron-dplR-d} \caption{The \code{wa082} chronology.} \label{fig:crn.plot} \end{figure} Note that the \code{chron} function will also compute a residual chronology by -"prewhitening" the series before averaging. If the \code{prewhiten} flag is +``prewhitening'' the series before averaging. If the \code{prewhiten} flag is set to \code{TRUE}, each series is whitened using \code{ar} prior to averaging. The -residual chronology is thus white noise and has no autocorrelation. Note that +residual chronology is thus white noise. Note that the \code{wa082.std.resid} object has two columns with chronologies as well as the sample depth in a third column. The result is plotted in Figure~\ref{fig:crn.plot.resid}. -<>= -wa082.std.resid <- chron(wa082.rwi, prefix="HUR",prewhiten = TRUE) +<>= +wa082.std.resid <- chron(wa082.rwi, prefix="HUR", prewhiten = TRUE) tail(wa082.std.resid) plot(wa082.std.resid, add.spline=TRUE, nyrs=30) @ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-d} +\includegraphics{chron-dplR-e} \caption{The \code{wa082} chronology as the standard chronology and the residual chronology.} \label{fig:crn.plot.resid} @@ -140,9 +143,9 @@ the \code{chron} function contains a column called \code{samp.depth} which shows the number of series that are average for a particular year. We can use the \code{subset} function to modify the chronology. The result is plotted in -Figure~\ref{fig:crn.plot.sd}. +Figure~\ref{fig:crn.plot.sd}. -<>= +<>= head(wa082.crn) wa082.trunc <- subset(wa082.crn, samp.depth > 5) # and plot @@ -151,16 +154,27 @@ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-e} +\includegraphics{chron-dplR-f} \caption{The \code{wa082} chronology truncated by sample depth.} \label{fig:crn.plot.sd} \end{figure} +It would likely be more robust to recalculate the \code{rwi} object by truncating the +\code{rwl} file and then making a chronology which could be done by nesting +commands via: +<>= +wa082.trunc2 <- chron(detrend(wa082[wa082.crn$samp.depth > 5,], + method="Spline"), prefix="HUR") +@ + +The result in this case is likely to be virtually identical to truncating after calculating +the chronology as in Figure~\ref{fig:crn.plot.sd}. + A more interesting and likely more robust approach is to truncate via the expressed population signal (EPS). The result is plotted in Figure~\ref{fig:crn.plot.eps}. -<>= +<>= wa082.ids <- autoread.ids(wa082) eps.cut <- 0.75 # An arbitrary EPS cutoff for demonstration wa082.rwi.stats <- rwi.stats.running(wa082.rwi, wa082.ids, window.length = 30) @@ -192,7 +206,7 @@ ## that difference is essentially nil. yr.mask <- yrs > cutoff yrs2 <- yrs[yr.mask] -wa082.rwi2 <- wa082.rwi[yr.mask, ] +wa082.rwi2 <- detrend(wa082[yr.mask, ], method="Spline") wa082.crn.eps <- chron(wa082.rwi2) plot(yrs2, wa082.crn.eps[, 1], type = "n", xlab = "Year", ylab = "RWI", axes=FALSE) @@ -207,21 +221,28 @@ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-f} +\includegraphics{chron-dplR-h} \caption{The \code{wa082} chronology truncated by EPS.} \label{fig:crn.plot.eps} \end{figure} +This method calculates a running value for EPS using the +\code{rwi.stats.running} function with e 30-year window. Then we select a +cutoff point where we truncate the chronology when the EPS value dips below +a certain point. The cutoff method works in this case because the EPS dips +as sample depth declines. However, some feel this is a more objective way +of setting a cutoff as opposed to just picking a minimum number of samples. + \subsection{Chronology uncertainty} Typically we calculate a chronology by taking the average of each year from the \code{rwi} object. (And that is typically the biweight robust mean.) The function -\code{chron} like pretty much all the functions in \code{dplR} are realtively simple +\code{chron} like pretty much all the functions in \code{dplR} are relatively simple chunks of code that are used for convenience. We can make our own chronology -and get the mean plus two standard error of the yearly growth +and get the mean plus two standard errors of the yearly growth (Figure~\ref{fig:crn.plot.se}). Don't get stuck in just using the prepackaged functions in \code{dplR}! -<>= +<>= wa082.avg <- apply(wa082.rwi2,1,mean,na.rm=TRUE) se <- function(x){ x2 <- na.omit(x) @@ -251,7 +272,7 @@ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-g} +\includegraphics{chron-dplR-i} \caption{The \code{wa082} chronology with two standard errors.} \label{fig:crn.plot.se} \end{figure} @@ -265,27 +286,32 @@ As we will see in this example two series are excluded which causes a modest improvement in EPS (Figure~\ref{fig:crn.plot.strip}). -<>= +<>= wa082.strip.rwl <- strip.rwl(wa082, ids = wa082.ids) wa082.rwi.strip <- detrend(wa082.strip.rwl, method="Spline") wa082.crn.strip <- chron(wa082.rwi.strip, prefix = "HUR") wa082.crn.strip <- subset(wa082.crn.strip, samp.depth > 5) -plot(wa082.crn.strip,add.spline=TRUE,nyrs=30) +plot(wa082.crn.strip, add.spline=TRUE, nyrs=30) @ \begin{figure}[ht] \centering -\includegraphics{chron-dplR-h} +\includegraphics{chron-dplR-j} \caption{The \code{wa082} chronology after stripping series with low EPS.} \label{fig:crn.plot.strip} \end{figure} \section{Conclusion} We have tried to introduce a few ways of building chronologies with \code{dplR} that -are either typical (like truncating by sample depth) or less commmonly used. +are either typical (like truncating by sample depth) or less commonly used. +In this vignette we aren't advocating any particular method but trying to +get the users familiar with ways of interacting with the objects that +\code{dplR} produces. Once the user understands the data structures the rest +of \code{R} opens up. + Again, we feel that it is important to reiterate that the advantage of using \code{dplR} is that it gets the analyst to use \code{R} and thus have access to the -essentailly limitless tool that it provides. Go foRth! +essentially limitless tool that it provides. Go foRth! \bibliography{dplR} From noreply at r-forge.r-project.org Tue Mar 15 01:04:14 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 15 Mar 2016 01:04:14 +0100 (CET) Subject: [Dplr-commits] r1022 - pkg/dplR Message-ID: <20160315000414.54ABD187393@r-forge.r-project.org> Author: andybunn Date: 2016-03-15 01:04:14 +0100 (Tue, 15 Mar 2016) New Revision: 1022 Modified: pkg/dplR/TODO Log: editing TODO Modified: pkg/dplR/TODO =================================================================== --- pkg/dplR/TODO 2016-03-15 00:02:44 UTC (rev 1021) +++ pkg/dplR/TODO 2016-03-15 00:04:14 UTC (rev 1022) @@ -1,3 +1,5 @@ +o [mvkorpel] Signal free standardization. The users are begging for it. + o [andybunn] Recode vignettes into markdown so as to have them on Rpubs? o [mvkorpel] Add option for smooth CI curves from theoretical AR1 in redfit! From noreply at r-forge.r-project.org Wed Mar 16 00:04:18 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 16 Mar 2016 00:04:18 +0100 (CET) Subject: [Dplr-commits] r1023 - pkg/dplR/data Message-ID: <20160315230418.A5BD8187FCE@r-forge.r-project.org> Author: andybunn Date: 2016-03-16 00:04:18 +0100 (Wed, 16 Mar 2016) New Revision: 1023 Modified: pkg/dplR/data/anos1.rda Log: anos1 had >1 object. Modified: pkg/dplR/data/anos1.rda =================================================================== (Binary files differ) From noreply at r-forge.r-project.org Wed Mar 16 22:56:54 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 16 Mar 2016 22:56:54 +0100 (CET) Subject: [Dplr-commits] r1024 - in tags: . dplR-1.6.4 Message-ID: <20160316215654.90B8B18820B@r-forge.r-project.org> Author: andybunn Date: 2016-03-16 22:56:54 +0100 (Wed, 16 Mar 2016) New Revision: 1024 Added: tags/dplR-1.6.4/ Log: Tagging release 1.6.4 Property changes on: tags/dplR-1.6.4 ___________________________________________________________________ Added: svn:ignore + dplR-Ex.R svn*.tmp .* *~ .Rproj.user *.Rproj 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 Wed Mar 16 23:01:26 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 16 Mar 2016 23:01:26 +0100 (CET) Subject: [Dplr-commits] r1025 - in pkg/dplR: . man Message-ID: <20160316220126.64119187FEB@r-forge.r-project.org> Author: andybunn Date: 2016-03-16 23:01:26 +0100 (Wed, 16 Mar 2016) New Revision: 1025 Modified: pkg/dplR/ChangeLog pkg/dplR/DESCRIPTION pkg/dplR/man/detrend.Rd pkg/dplR/man/detrend.series.Rd Log: New version number in DESCRIPTION and small change in detrend(.series) help files. Modified: pkg/dplR/ChangeLog =================================================================== --- pkg/dplR/ChangeLog 2016-03-16 21:56:54 UTC (rev 1024) +++ pkg/dplR/ChangeLog 2016-03-16 22:01:26 UTC (rev 1025) @@ -1,3 +1,10 @@ +* CHANGES IN dplR VERSION 1.6.5 + +File: detrend and detrend.series.Rd +----------------- + +- Added Friedman under method argument in the help file. It was ommitted by mistake. + * CHANGES IN dplR VERSION 1.6.4 File: DESCRIPTION Modified: pkg/dplR/DESCRIPTION =================================================================== --- pkg/dplR/DESCRIPTION 2016-03-16 21:56:54 UTC (rev 1024) +++ pkg/dplR/DESCRIPTION 2016-03-16 22:01:26 UTC (rev 1025) @@ -2,8 +2,8 @@ Package: dplR Type: Package Title: Dendrochronology Program Library in R -Version: 1.6.4 -Date: 2016-03-07 +Version: 1.6.5 +Date: 2016-03-16 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/detrend.Rd =================================================================== --- pkg/dplR/man/detrend.Rd 2016-03-16 21:56:54 UTC (rev 1024) +++ pkg/dplR/man/detrend.Rd 2016-03-16 22:01:26 UTC (rev 1025) @@ -28,8 +28,8 @@ \item{method}{ a \code{character} vector to determine the detrending methods. See details below. Possible values are all subsets of - \code{c("Spline", "ModNegExp", "Mean", "Ar")}. Defaults to using all the - available methods.} + \code{c("Spline", "ModNegExp", "Mean", "Ar", "Friedman")}. Defaults to + using all the available methods.} \item{nyrs}{ a number giving the rigidity of the smoothing spline, defaults to 0.67 of series length if \code{\var{nyrs}} is Modified: pkg/dplR/man/detrend.series.Rd =================================================================== --- pkg/dplR/man/detrend.series.Rd 2016-03-16 21:56:54 UTC (rev 1024) +++ pkg/dplR/man/detrend.series.Rd 2016-03-16 22:01:26 UTC (rev 1025) @@ -26,8 +26,8 @@ \item{method}{ a \code{character} vector to determine the detrending methods. See details below. Possible values are all subsets of - \code{c("Spline", "ModNegExp", "Mean", "Ar")}. Defaults to using all the - available methods.} + \code{c("Spline", "ModNegExp", "Mean", "Ar", "Friedman")}. Defa + ults to using all the available methods.} \item{nyrs}{ a number controlling the smoothness of the fitted curve in method \code{"Spline"},