[Dplr-commits] r767 - pkg/dplR/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 4 20:39:02 CEST 2014


Author: andybunn
Date: 2014-04-04 20:39:01 +0200 (Fri, 04 Apr 2014)
New Revision: 767

Added:
   pkg/dplR/vignettes/dplR.bib
Modified:
   pkg/dplR/vignettes/dplR.sty
   pkg/dplR/vignettes/intro-dplR.Rnw
Log:
Vignette stuff: came up with a simpler sty file. Added a bibliography. Outlined the intro vignette.

Added: pkg/dplR/vignettes/dplR.bib
===================================================================
--- pkg/dplR/vignettes/dplR.bib	                        (rev 0)
+++ pkg/dplR/vignettes/dplR.bib	2014-04-04 18:39:01 UTC (rev 767)
@@ -0,0 +1,45 @@
+ at article{Bunn2008,
+abstract = {I present and describe a new software package in the R statistical programming environment for dendrochronology. R is considered the worldÕs pre-eminent open-source statistical computing environment where users can contribute packages, which are freely available on the Internet. The dendrochronology program library in R (dplR) is able to read standard decadal-format files and allows users to perform several standard analyses including interactive detrending, chronology building, and the calculation of standard descriptive statistics. The package can also produce a variety of publication quality plots. The dplR package should make it easier for dendrochronologists to take advantage of R and use it as their primary analytic environment.},
+author = {Bunn, Andrew G},
+doi = {10.1016/j.dendro.2008.01.002},
+file = {:Users/bunna/Documents/other/pdfs/Bunn 2008 Dendrochronologia.pdf:pdf},
+issn = {11257865},
+journal = {Dendrochronologia},
+keywords = {chronology,detrending,r,statistical software},
+mendeley-groups = {sensitivityMS,BunnHughesERL},
+number = {2},
+pages = {115--124},
+publisher = {Elsevier},
+title = {{A dendrochronology program library in R (dplR)}},
+url = {http://linkinghub.elsevier.com/retrieve/pii/S1125786508000350},
+volume = {26},
+year = {2008}
+}
+
+ at article{Bunn2010,
+abstract = {I demonstrate new functionality for the Dendrochronology Program Library in R (dplR) that allows for flexible statistical crossdating of tree-ring data. Using a well-dated ring-width file, I give examples of howdplR can be used to examine correlations between each series and a master chronology according to overlapping time periods (segments) specified by the user; examine moving correlations of suspect series; and compute cross-correlation functions to identify specific dating issues. I also show how automatically generated skeleton plots can be used to visually crossdate. Much of the terminology and approach used for crossdating in dplR will be familiar to users of COFECHA.},
+author = {Bunn, Andrew G},
+doi = {10.1016/j.dendro.2009.12.001},
+file = {:Users/bunna/Documents/other/pdfs/Bunn2010Dendrochronologia.pdf:pdf},
+issn = {11257865},
+journal = {Dendrochronologia},
+keywords = {cofecha,cross correlation,moving correlation,skeleton plot,statistical software},
+number = {4},
+pages = {251--258},
+publisher = {Elsevier GmbH.},
+title = {{Statistical and visual crossdating in R using the dplR library}},
+url = {http://linkinghub.elsevier.com/retrieve/pii/S1125786510000172},
+volume = {28},
+year = {2010}
+}
+
+ at manual{Bunn2012,
+annote = {R package version 1.5.5},
+author = {Bunn, Andrew G and Korpela, Mikko and Biondi, Franco and Qeadan, Fares and Zang, Christian},
+mendeley-groups = {sensitivityMS},
+title = {{dplR: Dendrochronology Program Library in R}},
+url = {http://www.wwu.edu/huxley/treering/dplR.shtml, http://r-forge.r-project.org/projects/dplr/},
+year = {2012}
+}
+
+

Modified: pkg/dplR/vignettes/dplR.sty
===================================================================
--- pkg/dplR/vignettes/dplR.sty	2014-04-04 13:47:08 UTC (rev 766)
+++ pkg/dplR/vignettes/dplR.sty	2014-04-04 18:39:01 UTC (rev 767)
@@ -4,37 +4,7 @@
 \usepackage[utf8x]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage{sidecap}
-\@ifclassloaded{amsart}%
-{\setlength{\captionindent}{0pt}} % sidecap needs this with amsart
-{}
-\usepackage[english]{babel} % kluge to avoid visible ~ in Figure~1.
-\renewcommand{\floatpagefraction}{0.8}
 \usepackage{booktabs}
 \usepackage{Sweave}
 \usepackage{hyperref}
 \usepackage[round]{natbib}
-\renewcommand{\cite}{\citep}
-%% layout depends on the number of columns
-\if at twocolumn
-  \renewenvironment{Schunk}{\par\footnotesize}{} % smaller examples
-  \setkeys{Gin}{width=\linewidth} % column wide figs
-\else
-  \renewenvironment{Schunk}{\par\small}{} % small examples
-  \setkeys{Gin}{width=0.55\linewidth} % narrow figs for sidecaps
-  \renewenvironment{figure}[1][tp]{\begin{SCfigure}[][#1]}{\end{SCfigure}} %sidecaps
-\fi
-%% macros
-%% \code should handle _ ,  ~ and $ 
-\makeatletter
-\newcommand\code{\bgroup\@makeother\_\@makeother\~\@makeother\$\@codex}
-\def\@codex#1{{\normalfont\ttfamily\hyphenchar\font=-1 #1}\egroup}
-\makeatother
-%% simple macros
-\newcommand{\pkg}[1]{\textbf{#1}}
-\newcommand{\proglang}[1]{\textsf{#1}}
-\newcommand{\R}{\proglang{R}}
-\newcommand{\E}{\mathsf{E}}
-\newcommand{\VAR}{\mathsf{VAR}}
-\newcommand{\COV}{\mathsf{COV}}
-\newcommand{\Prob}{\mathsf{P}}
-

Modified: pkg/dplR/vignettes/intro-dplR.Rnw
===================================================================
--- pkg/dplR/vignettes/intro-dplR.Rnw	2014-04-04 13:47:08 UTC (rev 766)
+++ pkg/dplR/vignettes/intro-dplR.Rnw	2014-04-04 18:39:01 UTC (rev 767)
@@ -1,50 +1,56 @@
 % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
 %\VignetteIndexEntry{Introduction to dplR}
 \documentclass[a4paper,10pt]{article}
-\usepackage{dplR} % dplR settings
+\usepackage{dplR} % dplR settings - simple now - could do something more interesting
 
-\title{dplR: an introduction} 
+\title{An introduction to dplR} 
 \author{Andy Bunn}
 
 \date{\footnotesize{$ $Processed with dplR \Sexpr{packageDescription("dplR", field="Version")}
 in \Sexpr{R.version.string} on \today}}
 
-%% need no \usepackage{Sweave}
 \begin{document}
+\bibliographystyle{jss}
+
 \SweaveOpts{concordance=TRUE}
-
 \SweaveOpts{strip.white=true}
-<<echo=false>>=
-par(mfrow=c(1,1))
-options(width=72)
-figset <- function() par(mar=c(4,4,1,1)+.1)
-options(SweaveHooks = list(fig = figset))
-options("prompt" = "> ", "continue" = "  ")
-@
 
 \maketitle
 \begin{abstract}
-This document describes basic features of dplR including detrending
-ring widths, building chronologies, and calcualting descriptive 
-statistics.
+This document describes basic features of dplR including the detrending
+and standardization of ring-width data, building chronologies, and calcualting descriptive 
+statistics. A range of simple plots are also presented. Stasistical cross dating 
+is presented in a seperate vignette.
 \end{abstract}
 \tableofcontents
 
 \vspace{3ex}
-\noindent \pkg{dplR} is a package for dendrochronologists.  This
+\noindent dplR is a package for dendrochronologists.  This
 documents gives just a brief introduction of some of the most commonly
-used functions in \pkg{dplR}. There is more detailed information available
-in the literature (Bunn papers here).
+used functions in dplR. There is more detailed information available
+in the help files and in the literature including \cite{Bunn2008} and 
+\cite{Bunn2010}.
+\newpage
 
+\section{Introduction}
+
+\section{Working with Ring-Width Data}
+\subsection{Reading Data}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. In id purus est. Aenean pretium augue non mauris adipiscing, quis suscipit mi porta. Aliquam tempor purus a ante vulputate malesuada. Nam bibendum massa leo. Suspendisse cursus dignissim tincidunt. Aliquam erat lectus, eleifend eu faucibus sed, dignissim in tortor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas tempor ante elit, sit amet pretium felis vulputate iaculis. Ut fringilla pharetra faucibus.
+
+
+\subsection{Describing and Plotting Ring-Width Data}
+orem ipsum dolor sit amet, consectetur adipiscing elit. Sed semper.
+
 \section{Detrending}
 
 The dplR package contains most standard detrending methods including
 detrending via splines, curve fitting, and so on. There are also methods for 
-detrending that are less commonly used but preferred by some. In this chapter I describe
+detrending that are less commonly used but preferred by some. In this section I describe
 functions detrend and rcs and cms.
 
 \subsection{Common Detrending Methods}
-Detrending an rwl object with a modified engative exponential is done like this:
+Detrending an rwl object with a modified negative exponential is done like this:
   
 <<>>=
 library(dplR)
@@ -57,8 +63,46 @@
 dim(ca533)
 dim(ca533.rwi)
 @
-Got it? Good. 
 
+\subsection{Other Detrending Methods}
+E.g., RCS and CMS.
 
+\section{Descriptive Statisitcs}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus eget.
 
+\section{Building a Mean Value Chronology}
+Let's make a chronology and plot it. First we make a chronology
+<<>>=
+ca533.crn <- chron(ca533.rwi, prefix = "CAM")
+@
+And we can plot it.
+<<a>>=
+chron.plot(ca533.crn)
+@
+\begin{figure}
+<<fig=true,echo=false>>=
+<<a>>
+@
+\caption{Default chronology plot.}
+\label{fig:chron.plot}
+\end{figure}
+
+We can add options like a smoothing spline.
+<<a>>=
+chron.plot(ca533.crn,add.spline=TRUE,nyrs=20)
+@
+\begin{figure}
+<<fig=true,echo=false>>=
+<<a>>
+@
+\caption{A chronology plot with a 20-year smoothing spline added.}
+\label{fig:chron.plot.spline}
+\end{figure}
+
+\section{Prospectus}
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce pharetra.
+
+\bibliography{dplR}
+
+
 \end{document}



More information about the Dplr-commits mailing list