DRIVER=pcieport
PCI_CLASS=60400
PCI_ID=1B36:000C
PCI_SUBSYS_ID=1B36:0000
PCI_SLOT_NAME=0000:00:02.2
MODALIAS=pci:v00001B36d0000000Csv00001B36sd00000000bc06sc04i00
  6   ·ˆl–Ãa¾”Jj"T%�rãaS�ÿ�þYuá,ÙG,e#òdóÃ„B?ÂÄÀ 7‚    ·% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
%\VignetteIndexEntry{Introduction to ordination in vegan}
\documentclass[a4paper,10pt]{article}
\usepackage{vegan} % vegan settings

\title{Vegan: an introduction to ordination}
\author{Jari Oksanen}

\date{\footnotesize{
  processed with vegan
\Sexpr{packageDescription("vegan", field="Version")}
in \Sexpr{R.version.string} on \today}}

%% need no \usepackage{Sweave}
\begin{document}

\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}
  The document describes typical, simple work pathways of
  vegetation ordination. Unconstrained ordination uses as examples
  detrended correspondence analysis and non-metric multidimensional
  scaling, and shows how to interpret their results by fitting
  environmental vectors and factors or smooth environmental surfaces
  to the graph. The basic plotting command, and more advanced plotting
  commands for congested plots are also discussed, as well as adding
  items such as ellipses, convex hulls, and other items for
  classes. The constrained ordination uses constrained (canonical)
  correspondence analysis as an example. It is first shown how a model
  is defined, then the document discusses model building and
  significance tests of the whole analysis, single constraints and
  axes.
\end{abstract}
\tableofcontents

\vspace{3ex}
\noindent \pkg{Vegan} is a package for community ecologists.  This
documents explains how the commonly used ordination methods can be
performed in \pkg{vegan}.  The document only is a very basic
introduction.
%Another document (\emph{vegan tutorial})
%(\url{http://cc.oulu.fi/~jarioksa/opetus/method/vegantutor.pdf}) gives
%a longer and more detailed introduction to ordination.
The
current document only describes a small part of all \pkg{vegan}
functions.  For most functions, the canonical references are the
\pkg{vegan} help pages, and some of the most important additional
functions are listed at this document.

\section{Ordination}

The \pkg{vegan} package contains all common ordination methods:
Principal component analysis (function \code{rda}, or \code{prcomp} in
the base \proglang{R}), correspondence analysis (\code{cca}),
detrended correspondence analysis (\code{decorana}) and a wrapper for
non-metric multidimensional scaling (\code{metaMDS}).  Functions
\code{rda} and \code{cca} mainly are designed for constrained
ordination, and will be discussed later.  In this chapter I describe
functions \code{decorana} and \code{metaMDS}.

\subsection{Detrended correspondence analysis}


Detrended correspondence analysis (\textsc{dca}) is done like this:
<<>>=
library(vegan)
data(dune)
ord <- decorana(dune)
@
This saves ordination results in \code{ord}:
<<>>=
ord
@
The display of results is very brief: only eigenvalues and used
options are listed.  Actual ordination results are not shown, but you
can see them with command \code{summary(ord)}, or extract the scores
with command \code{scores}.  The \code{plot} function also
automatically knows how to access the scores.

\subsection{Non-metric multidimensional scaling}


Function \code{metaMDS} is a bit special case.  The actual ordination
is performed by function \pkg{vegan} function \code{monoMDS} (or
alternatively using \code{isoMDS} of the \pkg{MASS} package).
Function \code{metaMDS} is a wrapper to perform non-metric
multidimensional scaling (\textsc{nmds}) like recommended in community
ordination: it uses adequate dissimilarity measures (function
\code{vegdist}), then it runs \textsc{nmds} several times with random
starting configurations, compares results (function
\code{procrustes}), and stops after finding twice a similar minimum
stress sol