[Vegan-commits] r2575 - pkg/vegan/inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 22 12:51:42 CEST 2013


Author: jarioksa
Date: 2013-07-22 12:51:42 +0200 (Mon, 22 Jul 2013)
New Revision: 2575

Modified:
   pkg/vegan/inst/doc/decision-vegan.Rnw
   pkg/vegan/inst/doc/diversity-vegan.Rnw
   pkg/vegan/inst/doc/vegan.sty
Log:
edit Rnw

Modified: pkg/vegan/inst/doc/decision-vegan.Rnw
===================================================================
--- pkg/vegan/inst/doc/decision-vegan.Rnw	2013-07-18 16:02:14 UTC (rev 2574)
+++ pkg/vegan/inst/doc/decision-vegan.Rnw	2013-07-22 10:51:42 UTC (rev 2575)
@@ -258,9 +258,9 @@
 
 \section{Nestedness and Null models}
 
-Some indicators of nestedness and null models of communities are only
-described in general terms, and they could be implemented in various
-ways. Here I discuss the implementation in \pkg{vegan}.
+Some published indices of nestedness and null models of communities
+are only described in general terms, and they could be implemented in
+various ways. Here I discuss the implementation in \pkg{vegan}.
 
 \subsection{Matrix temperature}
 
@@ -305,12 +305,12 @@
 
 \begin{itemize}
 \item Species and sites are put into unit square \citep{RodGir06}. The
-  coordinates for $n$ item will be $(k-0.5)/n$ for $k=1 \ldots n$, so
-  that there are no points in the corners or the margins of the unit
-  square, and a diagonal line can be drawn through any point. I do not
-  know how the rows and columns are converted to the unit square in
-  other software, and this may be a considerable source of differences
-  among implementations.
+  row and column coordinates will be $(k-0.5)/n$ for $k=1 \ldots n$,
+  so that there are no points in the corners or the margins of the
+  unit square, and a diagonal line can be drawn through any point. I
+  do not know how the rows and columns are converted to the unit
+  square in other software, and this may be a considerable source of
+  differences among implementations.
   \item Species and sites are ordered alternately using indices
     \citep{RodGir06}:
     \begin{equation}
@@ -349,7 +349,7 @@
     \citep{RodGir06}. Small details in the fill line combined with
     differences in scores used in the unit square (especially in the
     corners) can cause large differences in the results.
-  \item A line with slope $-1$ is drawn through the point and the $x$
+  \item A line with slope\,$= -1$ is drawn through the point and the $x$
     coordinate of the intersection of this line and the fill line is
     found using function \code{uniroot}. The difference of this
     intersection and the row coordinate gives the argument $d$ of matrix
@@ -414,7 +414,7 @@
 \code{rda} and \code{prcomp} even use \textsc{svd} internally in
 their algorithm.
 
-In \textsc{svd} a centred data matrix is decomposed into orthogonal
+In \textsc{svd} a centred data matrix $\mathbf{X} = \{x_{ij}\}$ is decomposed into orthogonal
 components so that $x_{ij} = \sum_k \sigma_k u_{ik} v_{jk}$, where
 $u_{ik}$ and $v_{jk}$ are orthonormal coefficient matrices and
 $\sigma_k$ are singular values.  Orthonormality means that sums of
@@ -440,7 +440,7 @@
 found indirectly as well, so that we have the same components in both
 methods.
 
-The coefficients $u_{ik}$ and $v_{jk}$ are scaled similarly for all
+The coefficients $u_{ik}$ and $v_{jk}$ are scaled to unit length for all
 axes $k$. Singular values $\sigma_k$ or eigenvalues $\lambda_k$ give
 the information of the importance of axes, or the `axis lengths.'
 Instead of the orthonormal coefficients, or equal length axes, it is
@@ -469,8 +469,10 @@
     with some additional constant multiplier).  }
  \begin{tabular}{lcc}
   \\
+  \toprule
 & \textbf{Site scores} $u_{ik}^*$ &
 \textbf{Species scores} $v_{jk}^*$ \\
+\midrule
 \code{prcomp, princomp} &
 $u_{ik} \sqrt{n-1} \sqrt{\lambda_k}$ &
 $v_{jk}$ \\
@@ -487,7 +489,7 @@
 \code{rda, scaling < 0} &
 $u_{ik}^*$ &
 $\sqrt{\sum \lambda_k /(n-1)} s_j^{-1} v_{jk}^*$
-% \\
+\\
 % \code{Canoco 3, scaling=-1} &
 % $u_{ik} \sqrt{n-1} \sqrt{\lambda_k / \sum \lambda_k}$ &
 % $v_{jk} \sqrt{n}$ \\
@@ -498,6 +500,7 @@
 % \code{Canoco 3, scaling=-3} &
 % $u_{ik} \sqrt{n-1} \sqrt[4]{\lambda_k / \sum \lambda_k}$ &
 % $v_{jk} \sqrt{n} \sqrt[4]{\lambda_k / \sum \lambda_k}$
+\bottomrule
 \end{tabular}
 \end{table*}
 
@@ -549,6 +552,7 @@
 have two separate scaling constants: the first for the species, and
 the second for sites and friends, and this allows getting scores of
 other software or \proglang{R} functions (Table \ref{tab:rdaconst}). 
+
 \begin{table*}[t]
   \centering
   \caption{\label{tab:rdaconst} Values of the \code{const} argument in
@@ -559,11 +563,14 @@
     \code{tot.chi} in the \code{rda} result)}.
  \begin{tabular}{lccc}
   \\
+  \toprule
 & \textbf{Scaling} &\textbf{Species constant} & \textbf{Site constant} \\
+\midrule
 \pkg{vegan} & any  & $\sqrt[4]{(n-1) \sum \lambda_k}$ & $\sqrt[4]{(n-1) \sum \lambda_k}$\\
 \code{prcomp}, \code{princomp} & \code{1} & $1$ & $\sqrt{(n-1) \sum_k \lambda_k}$\\
 \proglang{Canoco\,v3} & \code{-1, -2, -3} & $\sqrt{n-1}$ & $\sqrt{n}$\\
-\proglang{Canoco\,v4} & \code{-1, -2, -3} & $\sqrt{m}$ & $\sqrt{n}$
+\proglang{Canoco\,v4} & \code{-1, -2, -3} & $\sqrt{m}$ & $\sqrt{n}$\\
+\bottomrule
 \end{tabular}
 \end{table*}
 
@@ -600,25 +607,23 @@
 species scores that are as similar to LC scores as possible.
 \end{itemize}
 Many computer programs for constrained ordinations give only or
-primarily LC scores, following Mike Palmer's recommendation
-\cite{Palmer93}.  However, functions \code{cca} and \code{rda} in
+primarily LC scores following recommendation of
+\citet{Palmer93}.  However, functions \code{cca} and \code{rda} in
 the \pkg{vegan} package use primarily WA scores. This chapter
 explains the reasons for this choice.
 
 Briefly, the main reasons are that
 \begin{itemize}
-\item
-LC scores \emph{are} linear combinations, so they give us only the
-(scaled) environmental variables. This means that they are
-independent of vegetation and cannot be found from the species
-composition.  Moreover, identical combinations of environmental
-variables give identical LC scores irrespective of vegetation.
-\item
-Bruce McCune has demonstrated that noisy environmental variables
-result in deteriorated LC scores whereas WA scores tolerate some errors
-in environmental variables \cite{McCune97}.  All environmental
-measurements contain some errors, and therefore it is safer to use WA
-scores.
+\item LC scores \emph{are} linear combinations, so they give us only
+  the (scaled) environmental variables. This means that they are
+  independent of vegetation and cannot be found from the species
+  composition.  Moreover, identical combinations of environmental
+  variables give identical LC scores irrespective of vegetation.
+\item \citet{McCune97} has demonstrated that noisy environmental
+  variables result in deteriorated LC scores whereas WA scores
+  tolerate some errors in environmental variables.  All environmental
+  measurements contain some errors, and therefore it is safer to use
+  WA scores.
 \end{itemize}
 This article studies mainly the first point.  The users of
 \pkg{vegan} have a choice of either LC or WA (default) scores, but
@@ -706,9 +711,7 @@
 on the variability of site totals.
 
 The original data and shuffled data differ in their goodness of
-fit\footnote{Or probably differ: The randomization is done while
-generating this article, and different versions may have different
-randomizations.}.
+fit:
 <<>>=
 orig
 shuff
@@ -750,7 +753,6 @@
 <<>>=
 data(dune)
 data(dune.env)
-summary(dune.env)
 orig <- cca(dune ~ Moisture, dune.env)
 @
 When the results are plotted using LC scores, sample plots fall only

Modified: pkg/vegan/inst/doc/diversity-vegan.Rnw
===================================================================
--- pkg/vegan/inst/doc/diversity-vegan.Rnw	2013-07-18 16:02:14 UTC (rev 2574)
+++ pkg/vegan/inst/doc/diversity-vegan.Rnw	2013-07-22 10:51:42 UTC (rev 2575)
@@ -201,13 +201,12 @@
 
 Simple diversity indices only consider species identity: all different
 species are equally different. In contrast, taxonomic and functional
-diversity indices judge the differences of species
-are. Taxonomic and functional diversities are used in different fields
-of science, but they really have very similar reasoning, and either
-could be used either with taxonomic or functional properties of
-species.
+diversity indices judge the differences of species. Taxonomic and
+functional diversities are used in different fields of science, but
+they really have very similar reasoning, and either could be used
+either with taxonomic or functional traits of species.
 
-\subsection{Taxonomic diversity: average distance of properties}
+\subsection{Taxonomic diversity: average distance of traits}
 
 The two basic indices are called taxonomic diversity ($\Delta$) and
 taxonomic distinctness ($\Delta^*$):
@@ -269,13 +268,13 @@
 \label{fig:taxondive}
 \end{figure}
 
-\subsection{Functional diversity: the height of property tree}
+\subsection{Functional diversity: the height of trait tree}
 
 In taxonomic diversity the primary data were taxonomic trees which
 were transformed to pairwise distances among species. In functional
-diversity the primary data are species properties which are translated
-to pairwise distances among species and then to clustering trees of
-species properties. The argument for trees is that in this way a
+diversity the primary data are species traits which are translated to
+pairwise distances among species and then to clustering trees of
+species traits. The argument for using trees is that in this way a
 single deviant species will have a small influence, since its
 difference is evaluated only once instead of evaluating its distance
 to all other species.
@@ -350,7 +349,7 @@
 seems that Preston split ties between adjacent octaves: only half of
 the species observed once were in the first octave, and half were
 transferred to the next octave, and the same for all species at the
-octave limits occuring 2, 4, 8, 16\ldots times. Function
+octave limits occurring 2, 4, 8, 16\ldots times. Function
 \code{prestonfit} can either split the ties or keep all limit cases in
 the lower octave.
 Function \code{prestondistr} directly

Modified: pkg/vegan/inst/doc/vegan.sty
===================================================================
--- pkg/vegan/inst/doc/vegan.sty	2013-07-18 16:02:14 UTC (rev 2574)
+++ pkg/vegan/inst/doc/vegan.sty	2013-07-22 10:51:42 UTC (rev 2575)
@@ -16,6 +16,7 @@
 {}
 \usepackage[english]{babel} % kluge to avoid visible ~ in Figure~1.
 \renewcommand{\floatpagefraction}{0.8}
+\usepackage{booktabs}
 \usepackage{Sweave}
 \usepackage{hyperref}
 %% layout depends on the number of columns



More information about the Vegan-commits mailing list