[Vegan-commits] r511 - in pkg: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 30 14:36:45 CEST 2008
Author: jarioksa
Date: 2008-09-30 14:36:44 +0200 (Tue, 30 Sep 2008)
New Revision: 511
Added:
pkg/R/head.cca.R
Modified:
pkg/DESCRIPTION
pkg/inst/ChangeLog
pkg/man/plot.cca.Rd
Log:
head.cca & tail.cca for friendlier look in Sweave tutorials
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-09-30 07:04:55 UTC (rev 510)
+++ pkg/DESCRIPTION 2008-09-30 12:36:44 UTC (rev 511)
@@ -1,7 +1,7 @@
Package: vegan
Title: Community Ecology Package
-Version: 1.16-0
-Date: September 26, 2008
+Version: 1.16-1
+Date: September 30, 2008
Author: Jari Oksanen, Roeland Kindt, Pierre Legendre, Bob O'Hara, Gavin L. Simpson,
Peter Solymos, M. Henry H. Stevens, Helene Wagner
Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>
Added: pkg/R/head.cca.R
===================================================================
--- pkg/R/head.cca.R (rev 0)
+++ pkg/R/head.cca.R 2008-09-30 12:36:44 UTC (rev 511)
@@ -0,0 +1,9 @@
+`head.cca` <-
+ function(x, n=6, tail = 0, ...) {
+ print(summary(x, ...), head=n, tail=tail)
+ }
+
+`tail.cca` <-
+ function(x, n=6, head = 0, ...) {
+ print(summary(x, ...), head=head, tail=n)
+ }
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2008-09-30 07:04:55 UTC (rev 510)
+++ pkg/inst/ChangeLog 2008-09-30 12:36:44 UTC (rev 511)
@@ -3,10 +3,17 @@
VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
-Version 1.16-0 (opened September 26, 2008)
+Versin 1.16-1 (opened September 30, 2008)
- * New devel version after branching the release version 1.15-0.
+ * head.cca & tail.cca: shortcuts to print(summary(x, ...), head,
+ tail) for nicer Sweave tutorials.
+Version 1.16-0 (closed on September 30, 2008)
+
+ * New devel version after branching the release version
+ 1.15-0. Identical to the release version except that MOStest and
+ adipart functions were removed from 1.15-0.
+
Version 1.14-12 (closed September 26, 2008)
* add1.cca, drop1.cca: new functions that also implement
Modified: pkg/man/plot.cca.Rd
===================================================================
--- pkg/man/plot.cca.Rd 2008-09-30 07:04:55 UTC (rev 510)
+++ pkg/man/plot.cca.Rd 2008-09-30 12:36:44 UTC (rev 511)
@@ -7,6 +7,8 @@
\alias{summary.cca}
\alias{print.summary.cca}
\alias{ade2vegancca}
+\alias{head.cca}
+\alias{tail.cca}
\title{Plot or Extract Results of Constrained Correspondence Analysis
or Redundancy Analysis}
@@ -28,6 +30,8 @@
\method{summary}{cca}(object, scaling = 2, axes = 6, display = c("sp", "wa",
"lc", "bp", "cn"), digits = max(3, getOption("digits") - 3), ...)
\method{print}{summary.cca}(x, digits = x$digits, head = NA, tail = head, ...)
+\method{head}{cca}(x, n = 6, tail = 0, ...)
+\method{tail}{cca}(x, n = 6, head = 0, ...)
}
\arguments{
@@ -69,9 +73,9 @@
approximate original data.}
\item{axes}{Number of axes in summaries.}
\item{digits}{Number of digits in output.}
- \item{head, tail}{Number of rows printed from the head and tail of
+ \item{n, head, tail}{Number of rows printed from the head and tail of
species and site scores. Default \code{NA} prints all.}
- \item{...}{Other parameters for plotting functions.}
+ \item{...}{Parameters passed to other functions.}
}
\details{
@@ -117,7 +121,16 @@
were little affected. Therefore the \code{plot} function uses site
scores (``WA scores'') as the default. This is consistent with the
usage in statistics and other functions in \R
- (\code{\link[MASS]{lda}}, \code{\link{cancor}}).
+ (\code{\link[MASS]{lda}}, \code{\link{cancor}}). The \code{summary}
+ output can be voluminous, but you can show only some lines of the
+ scores by setting \code{head} or \code{tail} arguments in
+ \code{print.summary.cca}, or by using functions \code{head} or
+ \code{tail}. Function \code{head} and \code{tail} are shortcuts to
+ \code{summary} with \code{head} or \code{tail} set in the
+ \code{print}. In general they only show \code{n} first or last rows of
+ the scores (and optionally also \code{head} or \code{tail}), but they
+ display all other results completely. They pass all arguments to
+ \code{summary}.
}
\value{
The \code{plot} function returns invisibly a plotting structure which
@@ -151,6 +164,8 @@
text(mod, dis="cn")
points(mod, pch=21, col="red", bg="yellow", cex=1.2)
text(mod, "species", col="blue", cex=0.8)
+## Limited output of 'summary'
+head(mod, tail=2)
}
\keyword{hplot}
\keyword{aplot}
More information about the Vegan-commits
mailing list