[Dplr-commits] r838 - in pkg/dplR: . vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 28 10:18:36 CEST 2014
Author: mvkorpel
Date: 2014-04-28 10:18:35 +0200 (Mon, 28 Apr 2014)
New Revision: 838
Modified:
pkg/dplR/ChangeLog
pkg/dplR/TODO
pkg/dplR/vignettes/timeseries-dplR.Rnw
Log:
Committing "forgotten" changes that are already found in CRAN
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2014-04-25 04:55:10 UTC (rev 837)
+++ pkg/dplR/ChangeLog 2014-04-28 08:18:35 UTC (rev 838)
@@ -86,10 +86,22 @@
-------------------------
- Very basic sty file
+File: dplR.bib
+-------------------------
+- Refs for vignettes
+
File: intro-dplR.Rnw
-------------------------
-- A vignette to intriduce dplR
+- A vignette to introduce dplR
+File: xdate-dplR.Rnw
+-------------------------
+- A vignette for cross-dating
+
+File: timeseries-dplR.Rnw
+-------------------------
+- A vignette for time series stuff. Very basic!
+
File: corr.series.seg.R
--------------------
- Added method argument to specify method for cor.test(). Defauts to
Modified: pkg/dplR/TODO
===================================================================
--- pkg/dplR/TODO 2014-04-25 04:55:10 UTC (rev 837)
+++ pkg/dplR/TODO 2014-04-28 08:18:35 UTC (rev 838)
@@ -1,3 +1,9 @@
+* Bug in common interval:
+ data(co021)
+ x <- common.interval(co021[,1:5],type="s",make.plot=T)
+ x <- common.interval(co021[,-c(1:5)],type="s",make.plot=T)
+ x <- common.interval(co021[,1:5],type="s",make.plot=F)
+
* 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.
The pick.rwl.series function was a great improvement to the former method
Modified: pkg/dplR/vignettes/timeseries-dplR.Rnw
===================================================================
--- pkg/dplR/vignettes/timeseries-dplR.Rnw 2014-04-25 04:55:10 UTC (rev 837)
+++ pkg/dplR/vignettes/timeseries-dplR.Rnw 2014-04-28 08:18:35 UTC (rev 838)
@@ -271,7 +271,7 @@
boundary = "periodic")
YrsLabels <- paste(2^(1:nPwrs2),"yrs",sep="")
- par(mar=c(3,2,2,2),mgp=c(1.25,0.25,0),tcl=0.25,tck=0.0125,
+ par(mar=c(3,2,2,2),mgp=c(1.25,0.25,0),tcl=0.5,
xaxs="i",yaxs="i")
plot(yrs,rep(1,nYrs),type="n", axes=FALSE, ylab="",xlab="",
ylim=c(-3,38))
@@ -310,6 +310,38 @@
An example was dropped because \code{"waveslim"} is not available.
\fi% End of conditional
+The pioneering work of Ed Cook -- e.g. \cite{cook1990} -- has left an enduring
+mark on nearly every aspect of quantitative dendrochrnology. One such mark
+that we already alluded to above is the use of smoothing splines to detrend
+and filter tree-ring data. So, we'll close with an example of how one
+can visualise an individual tree-rins series using splines
+(Figure~\ref{fig:spl}).
+
+<<g, fig=TRUE>>=
+par(mar=rep(2.5,4),mgp=c(1.2,0.25,0),tcl=0.5,
+ xaxs="i",yaxs="i")
+plot(yrs,dat,type="n",xlab="Year",ylab="RWI",axes=FALSE)
+grid(col="black",lwd=0.5)
+abline(h=1)
+lines(yrs,dat,col="grey",lwd=1)
+my.cols <- c("#A6611A","#DFC27D","#80CDC1","#018571")
+lines(yrs,ffcsaps(dat,nyrs=256),col=my.cols[1],lwd=3)
+lines(yrs,ffcsaps(dat,nyrs=128),col=my.cols[2],lwd=2)
+lines(yrs,ffcsaps(dat,nyrs=64),col=my.cols[3],lwd=2)
+lines(yrs,ffcsaps(dat,nyrs=32),col=my.cols[4],lwd=2)
+legend("topright", c("dat", "256yrs", "128yrs", "64yrs", "32yrs"),
+ lwd = 2, col = c("grey",my.cols),bg = "white")
+axis(1);axis(2);axis(3);axis(4)
+box()
+par(op)
+@
+\begin{figure}[g]
+ \centering
+ \includegraphics{timeseries-dplR-g}
+ \caption{The Mesa Verde chronology plotted with a variety of splines}
+ \label{fig:spl}
+\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
More information about the Dplr-commits
mailing list