[Dplr-commits] r913 - pkg/dplR/inst/doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Nov 10 22:16:26 CET 2014
Author: mvkorpel
Date: 2014-11-10 22:16:26 +0100 (Mon, 10 Nov 2014)
New Revision: 913
Modified:
pkg/dplR/inst/doc/math-dplR.R
pkg/dplR/inst/doc/math-dplR.Rnw.txt
pkg/dplR/inst/doc/math-dplR.bib
pkg/dplR/inst/doc/math-dplR.pdf
Log:
Changes in the "pseudo-vignette" math-dplR:
* Moved \documentclass to the beginning of the file. In the previous
form, the document stopped compiling somewhere between knitr 1.5 and
1.6, the current version being 1.7.
* Updated reference to the csaps function of Matlab. Noted that only
the most recent Matlab version is openly documented on the Mathworks
web site.
* The R code in math-dplR did not change, but there are whitespace
changes in math-dplR.R due to some changes in knitr.
Modified: pkg/dplR/inst/doc/math-dplR.R
===================================================================
--- pkg/dplR/inst/doc/math-dplR.R 2014-11-10 19:45:28 UTC (rev 912)
+++ pkg/dplR/inst/doc/math-dplR.R 2014-11-10 21:16:26 UTC (rev 913)
@@ -2,11 +2,9 @@
## ----"try-matlab", echo=FALSE, results="hide"----------------------------
TRY_MATLAB <- TRUE
-
## ----"flip-to-retry", echo=FALSE, results="hide", cache=TRUE-------------
"tails"
-
## ----"packages", echo=FALSE, results="hide"------------------------------
library(dplR) # latexify(), latexDate()
latexify2 <- function(x) latexify(x, doublebackslash = FALSE)
@@ -305,7 +303,6 @@
"\\texttt{ffcsaps}. The orange crosses show the results",
"when~\\eqref{eq:pinv.book} is used instead.")
-
## ----"response", opts.label="myfigures", fig.width=PAGE_WIDTH, fig.height=PAGE_HEIGHT-0.95, fig.cap=FFCSAPS_CAPTION, dependson=c("response-init", "response-comp"), cache.vars=character(0)----
op <- par(mfcol = c(3, 1), mgp = c(2, 0.75, 0), mar = par("mar") - 1)
@@ -365,7 +362,6 @@
smoothed.R[, i] <- ffcsaps2(y, p = P[i])
}
-
## ----"smoothed-matlab", dependson=c("smoothed-R", "flip-to-retry"), cache.vars=c("matlabValue", "matlabVersion", "smoothed.matlab")----
if (isTRUE(TRY_MATLAB)) {
fnames <- tempfile(pattern=c("a", "b", "c"), fileext=".txt")
@@ -412,7 +408,6 @@
matlabVersion <- "8.3.0.532 (R2014a)" # tested ok on 2014-05-12
}
-
## ----"R-matlab-compare", cache=FALSE, error=FALSE------------------------
if (isTRUE(TRY_MATLAB) && matlabValue == 0) {
stopifnot(identical(as.numeric(dim(smoothed.R)), c(100, 101)),
@@ -436,7 +431,6 @@
paste("Spline with different values of smoothing parameter",
"\\texttt{p} fitted to a noisy sine wave")
-
## ----"smoothed", opts.label="myfigures", fig.width=PAGE_WIDTH, fig.height=PAGE_WIDTH, fig.cap=SMOOTHED_CAPTION, dependson="smoothed-R", cache.vars=character(0)----
## Plot the input series and a few output series
COLORS <- c("black", colorschemes$Categorical.12[c(10, 2, 6, 8)])
Modified: pkg/dplR/inst/doc/math-dplR.Rnw.txt
===================================================================
--- pkg/dplR/inst/doc/math-dplR.Rnw.txt 2014-11-10 19:45:28 UTC (rev 912)
+++ pkg/dplR/inst/doc/math-dplR.Rnw.txt 2014-11-10 21:16:26 UTC (rev 913)
@@ -48,6 +48,8 @@
% required. A TeX Live installation, for example, should have all of
% the required packages.
+\documentclass[a4paper]{article}
+
<<"try-matlab", echo=FALSE, results="hide">>=
TRY_MATLAB <- TRUE
@
@@ -62,8 +64,6 @@
library(stats)
@
-\documentclass[a4paper]{article}
-
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\usepackage[english]{babel}
@@ -695,7 +695,13 @@
\texttt{p} as an argument and omit \texttt{nyrs} and \texttt{f}. I
created a segment of a noisy sine wave and smoothed it with both
functions using all values of \texttt{p} in the set \(\{0, 0.01, 0.02,
-\dots, 1\}\), covering the whole range of useful values~\cite{csaps}.
+\dots, 1\}\), covering the whole range of useful
+values~\cite{csaps}\footnote{The Mathworks web site openly provides access
+ to the documentation of the latest Matlab version. Older documents
+ are available after a login to the website or by running \texttt{doc
+ csaps} in the command prompt of a particular Matlab version. The
+ author has checked that the documentation of \texttt{csaps} agrees
+ between versions 2012b, 2013a, 2013b, 2014a and 2014b.}.
Using the R function \texttt{all.equal} to compare each pair of
smoothed series, I found that the results of \texttt{csaps} and
\texttt{ffcsaps} always matched. \Sexpr{matlabNoteText}
Modified: pkg/dplR/inst/doc/math-dplR.bib
===================================================================
--- pkg/dplR/inst/doc/math-dplR.bib 2014-11-10 19:45:28 UTC (rev 912)
+++ pkg/dplR/inst/doc/math-dplR.bib 2014-11-10 21:16:26 UTC (rev 913)
@@ -71,7 +71,7 @@
howpublished = {\url{http://www.mathworks.com/help/curvefit/csaps.html}},
OPTmonth = {},
OPTyear = {},
- note = {Accessed: 2014-05-12},
+ note = {Accessed: 2014-11-10. Documentation of the latest version at that time (Matlab R2014b).},
OPTannote = {}
}
Modified: pkg/dplR/inst/doc/math-dplR.pdf
===================================================================
(Binary files differ)
More information about the Dplr-commits
mailing list