[Dplr-commits] r762 - in pkg/dplR: . vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 4 06:40:08 CEST 2014
Author: andybunn
Date: 2014-04-04 06:40:08 +0200 (Fri, 04 Apr 2014)
New Revision: 762
Added:
pkg/dplR/vignettes/
pkg/dplR/vignettes/dplR.sty
pkg/dplR/vignettes/intro-dplR.Rnw
Modified:
pkg/dplR/ChangeLog
pkg/dplR/TODO
Log:
Made a start on vignettes. Just a start though.
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2014-04-03 19:33:23 UTC (rev 761)
+++ pkg/dplR/ChangeLog 2014-04-04 04:40:08 UTC (rev 762)
@@ -1,5 +1,17 @@
* CHANGES IN dplR VERSION 1.6.0
+Folder: vignettes
+-------------------------
+- Added a vignettes folder
+
+File: dplR.sty
+-------------------------
+- Copied the sty file from vegan for the time being
+
+File: intro-dplR.Rnw
+-------------------------
+- Began a vignette to intriduce dplR
+
File: NAMESPACE
-------------------------
- Added chron.plot to export list.
Modified: pkg/dplR/TODO
===================================================================
--- pkg/dplR/TODO 2014-04-03 19:33:23 UTC (rev 761)
+++ pkg/dplR/TODO 2014-04-04 04:40:08 UTC (rev 762)
@@ -1,3 +1,5 @@
+* Actually write the first intro vignette!
+
* Decide when to use class('rwl') in functions dealing with rwl objects.
Other than the plot S3Method for rwl, are there cases when having that class
would be useful. E.g., in error checking?
Added: pkg/dplR/vignettes/dplR.sty
===================================================================
--- pkg/dplR/vignettes/dplR.sty (rev 0)
+++ pkg/dplR/vignettes/dplR.sty 2014-04-04 04:40:08 UTC (rev 762)
@@ -0,0 +1,40 @@
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{ucs}
+\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}}
+
Added: pkg/dplR/vignettes/intro-dplR.Rnw
===================================================================
--- pkg/dplR/vignettes/intro-dplR.Rnw (rev 0)
+++ pkg/dplR/vignettes/intro-dplR.Rnw 2014-04-04 04:40:08 UTC (rev 762)
@@ -0,0 +1,64 @@
+% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
+%\VignetteIndexEntry{Introduction to dplR}
+\documentclass[a4paper,10pt]{article}
+\usepackage{dplR} % dplR settings
+
+\title{dplR: an introduction}
+\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}
+\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.
+\end{abstract}
+\tableofcontents
+
+\vspace{3ex}
+\noindent \pkg{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).
+
+\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
+functions detrend and rcs and cms.
+
+\subsection{Common Detrending Methods}
+Detrending an rwl object with a modified engative exponential is done like this:
+
+<<>>=
+library(dplR)
+data(ca533)
+ca533.rwi <- detrend(rwl = ca533, method = "ModNegExp")
+@
+This saves the results in ca533.rwi which is a data.frame with
+the same dimensions as the rwl object ca533:
+<<>>=
+dim(ca533)
+dim(ca533.rwi)
+@
+Got it? Good.
+
+
+
+\end{document}
More information about the Dplr-commits
mailing list