[Dplr-commits] r1069 - in pkg/dplR: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 18 09:19:08 CEST 2017
Author: mvkorpel
Date: 2017-05-18 09:19:08 +0200 (Thu, 18 May 2017)
New Revision: 1069
Removed:
pkg/dplR/R/sfrcs.R
pkg/dplR/man/sfrcs.Rd
Modified:
pkg/dplR/ChangeLog
pkg/dplR/DESCRIPTION
pkg/dplR/NAMESPACE
pkg/dplR/man/rcs.Rd
Log:
Undo addition of signal-free rcs (now in separate branch)
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/ChangeLog 2017-05-18 07:19:08 UTC (rev 1069)
@@ -64,16 +64,11 @@
- Package "gmp" is now in Suggests, not in Imports.
-File: sfrcs.R
-----------------
-
-- Added a detrending method, in function sfrcs(): Signal-Free
- Regional Curve Standardization (Melvin and Briffa, 2014).
-
File: rcs.R
----------------
-- Technical changes to facilitate the implementation of sfrcs().
+- Technical changes to facilitate the future implementation of
+ signal-free rcs.
File: src/redfit.c
----------------
Modified: pkg/dplR/DESCRIPTION
===================================================================
--- pkg/dplR/DESCRIPTION 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/DESCRIPTION 2017-05-18 07:19:08 UTC (rev 1069)
@@ -3,7 +3,7 @@
Type: Package
Title: Dendrochronology Program Library in R
Version: 1.6.6
-Date: 2017-05-10
+Date: 2017-05-18
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/NAMESPACE
===================================================================
--- pkg/dplR/NAMESPACE 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/NAMESPACE 2017-05-18 07:19:08 UTC (rev 1069)
@@ -49,8 +49,7 @@
write.compact, write.crn, write.rwl, write.tridas,
write.tucson, plot.rwl, interseries.cor, summary.rwl, plot.crn,
insert.ring, delete.ring, xskel.ccf.plot, xskel.plot, latexify,
- latexDate, rasterPlot, treeMean, rwl.report, print.rwl.report,
- sfrcs)
+ latexDate, rasterPlot, treeMean, rwl.report, print.rwl.report)
S3method(print, redfit)
S3method(plot, rwl)
Deleted: pkg/dplR/R/sfrcs.R
===================================================================
--- pkg/dplR/R/sfrcs.R 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/R/sfrcs.R 2017-05-18 07:19:08 UTC (rev 1069)
@@ -1,23 +0,0 @@
-sfrcs <- function(rwl, po, nyrs=NULL, f=0.5, ratios=TRUE,
- rc.out=FALSE, make.plot=TRUE, ...) {
- n_col <- length(rwl)
- rwl2 <- rwl
- rcs_out <- rcs(rwl2, po = po, nyrs = nyrs, f = f, biweight = FALSE,
- ratios = TRUE, rc.out = TRUE, make.plot = FALSE)
- rc <- chron(rcs_out[["rwi"]], biweight = FALSE, prewhiten = FALSE)[[1L]]
- while (any(rc <= 0.998, na.rm = TRUE) ||
- any(rc >= 1.002, na.rm = TRUE)) {
- for (k in seq_len(n_col)) {
- rwl2[[k]] <- rwl2[[k]] / rc
- }
- rcs_out <- rcs(rwl2, po = po, nyrs = nyrs, f = f, biweight = FALSE,
- ratios = TRUE, rc.out = TRUE, make.plot = FALSE,
- check = FALSE)
- rc <- chron(rcs_out[["rwi"]], biweight=FALSE, prewhiten=FALSE)[[1L]]
- }
- ## 'nyrs' and 'f' are ignored when rc.in is used, and 'biweight'
- ## only matters for plotting (when make.plot is TRUE)
- rcs(rwl, po = po, nyrs = nyrs, f = f, biweight = FALSE,
- ratios = ratios, rc.out = rc.out, make.plot = make.plot,
- rc.in = rcs_out[["rc"]], check = FALSE, ...)
-}
Modified: pkg/dplR/man/rcs.Rd
===================================================================
--- pkg/dplR/man/rcs.Rd 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/man/rcs.Rd 2017-05-18 07:19:08 UTC (rev 1069)
@@ -92,7 +92,7 @@
dplR by Andy Bunn. Patched and improved by Mikko Korpela.
}
\seealso{ \code{\link{detrend}}, \code{\link{chron}}, \code{\link{cms}},
- \code{\link{ffcsaps}}, \code{\link{sfrcs}} }
+ \code{\link{ffcsaps}} }
\examples{library(utils)
data(gp.rwl)
data(gp.po)
Deleted: pkg/dplR/man/sfrcs.Rd
===================================================================
--- pkg/dplR/man/sfrcs.Rd 2017-05-18 07:06:22 UTC (rev 1068)
+++ pkg/dplR/man/sfrcs.Rd 2017-05-18 07:19:08 UTC (rev 1069)
@@ -1,83 +0,0 @@
-\encoding{UTF-8}
-\name{sfrcs}
-\alias{sfrcs}
-\title{ Signal-Free Regional Curve Standardization }
-\description{
- Detrend multiple ring-width series simultaneously using a signal-free
- regional curve.
-}
-\usage{
-sfrcs(rwl, po, nyrs = NULL, f = 0.5, ratios = TRUE,
- rc.out = FALSE, make.plot = TRUE, \dots)
-}
-\arguments{
- \item{rwl}{ a \code{data.frame} with series as columns and years as
- rows such as that produced by \code{\link{read.rwl}} }
- \item{po}{ a \code{data.frame} containing two variables. Variable one
- (\code{\var{series}} in the example below) gives the series
- \acronym{ID} as either \code{character}s or \code{factor}s. These
- must exactly match \code{colnames(\var{rwl})}. Variable two
- (\code{\var{pith.offset}} in the example below) must be integral
- values and give the years from the beginning of the core to the pith
- (or center) of the tree. The minimum value is 1. }
- \item{nyrs}{ a number giving the rigidity of the smoothing spline,
- defaults to 0.1 of length of the maximum cambial age (i.e., the
- length of the regional curve) if \code{\var{nyrs}} is \code{NULL}. }
- \item{f}{ a number between 0 and 1 giving the frequency response or
- wavelength cutoff. Defaults to 0.5. }
- \item{ratios}{ \code{logical} flag. If \code{TRUE} (the default) then
- indices are calculated by division, if \code{FALSE} indices are
- calculated by subtraction. }
- \item{rc.out}{ \code{logical} flag. Returns the regional curve along
- with the ring-width indices if \code{TRUE}. }
- \item{make.plot}{ \code{logical} flag. Makes plots of the raw data and
- regional curve if \code{TRUE}. }
- \item{\dots}{ other arguments passed to
- \code{\link[graphics]{plot}}. }
-}
-\details{
-
- This method detrends and standardizes tree-ring series by calculating
- an age-related growth curve specific to the \code{\var{rwl}}. The
- Signal-Free \acronym{RCS} iteratively calls \code{\link{rcs}}
- according to \dQuote{Using the Signal-Free method with RCS} in Melvin
- and Briffa (2014).
-
- The option \code{\var{ratios}} only affects the creation of the final
- ring-width indices after the iterative detrending process (where
- \code{\var{ratios}=TRUE}) has converged. The function computes ordinary
- arithmetic means, i.e. passes \code{\var{biweight}=FALSE} to both
- \code{\link{rcs}} and \code{\link{chron}}.
-
-}
-\value{
-
- A \code{data.frame} containing the dimensionless and detrended
- ring-width indices with column names, row names and dimensions of
- \code{\var{rwl}}. If \code{\var{rc.out}} is \code{TRUE} then a
- \code{list} will be returned with a \code{data.frame} containing the
- detrended ring widths as above and a \code{vector} containing the
- regional curve.
-
-}
-\references{
- Melvin, T. M. and Briffa, K. R. (2014) CRUST: Software for the
- implementation of Regional Chronology Standardisation: Part
- 1. Signal-Free RCS. \emph{Dendrochronologia}, \bold{32}(1),
- 7\enc{–}{--}20.
-}
-\author{
- Mikko Korpela and Andy Bunn
-}
-\seealso{ \code{\link{detrend}}, \code{\link{chron}}, \code{\link{cms}},
- \code{\link{ffcsaps}}, \code{\link{rcs}} }
-\examples{library(utils)
-data(gp.rwl)
-data(gp.po)
-gp.rwi <- sfrcs(rwl = gp.rwl, po = gp.po,
- rc.out = TRUE, make.plot = FALSE)
-str(gp.rwi)
-gp.rwi <- sfrcs(rwl = gp.rwl, po = gp.po,
- make.plot = TRUE, main = "Regional Curve")
-}
-\keyword{ manip }
More information about the Dplr-commits
mailing list