Skip to content

Commit

Permalink
update to latest roxygen; use export not method and s3method; add som…
Browse files Browse the repository at this point in the history
…e imports from ggplot2; rebuild documentation
  • Loading branch information
gavinsimpson committed Feb 25, 2015
1 parent 4d070cf commit 0688ce2
Show file tree
Hide file tree
Showing 14 changed files with 106 additions and 103 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: ggvegan
Type: Package
Title: ggplot2 plots for vegan functions
Version: 0.0-1
Date: 20 April 2013
Version: 0.0-2
Date: 24 February 2015
Depends:
vegan,
ggplot2
Expand Down
9 changes: 9 additions & 0 deletions NAMESPACE
@@ -1,11 +1,20 @@
# Generated by roxygen2 (4.1.0): do not edit by hand

S3method(autoplot,cca)
S3method(autoplot,metaMDS)
S3method(autoplot,prc)
S3method(fortify,cca)
S3method(fortify,metaMDS)
S3method(fortify,prc)
importFrom(ggplot2,autoplot)
importFrom(ggplot2,coord_fixed)
importFrom(ggplot2,fortify)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_segment)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab)
importFrom(grid,arrow)
importFrom(grid,unit)
importFrom(reshape2,melt)
Expand Down
5 changes: 2 additions & 3 deletions R/autoplot.cca.R
Expand Up @@ -33,11 +33,10 @@ if(getRversion() >= "2.15.1") {
##' @return Returns a ggplot object.
##' @author Gavin L. Simpson
##'
##' @method autoplot cca
##' @S3method autoplot cca
##' @export
##'
##' @importFrom grid arrow unit
##' @importFrom ggplot2 autoplot
##' @importFrom ggplot2 autoplot ggplot geom_point geom_text geom_segment xlab ylab coord_fixed aes
##'
##' @examples
##' data(dune)
Expand Down
3 changes: 1 addition & 2 deletions R/autoplot.metaMDS.R
Expand Up @@ -31,8 +31,7 @@ if(getRversion() >= "2.15.1") {
##'
##' @author Gavin L. Simpson
##'
##' @method autoplot metaMDS
##' @S3method autoplot metaMDS
##' @export
##'
##' @importFrom grid arrow unit
##' @importFrom ggplot2 autoplot
Expand Down
3 changes: 1 addition & 2 deletions R/autoplot.prc.R
Expand Up @@ -33,8 +33,7 @@ if(getRversion() >= "2.15.1") {
##'
##' @author Gavin L. Simpson
##'
##' @method autoplot prc
##' @S3method autoplot prc
##' @export
##'
##' @examples
##' data(pyrifos)
Expand Down
3 changes: 1 addition & 2 deletions R/fortify.cca.R
Expand Up @@ -17,8 +17,7 @@
##' The first two components are the axis scores.
##' @author Gavin L. Simpson
##'
##' @method fortify cca
##' @S3method fortify cca
##' @export
##'
##' @importFrom ggplot2 fortify
##' @importFrom vegan scores
Expand Down
3 changes: 1 addition & 2 deletions R/fortify.metaMDS.R
Expand Up @@ -17,8 +17,7 @@
##' The first two components are the axis scores.
##' @author Gavin L. Simpson
##'
##' @method fortify metaMDS
##' @S3method fortify metaMDS
##' @export
##'
##' @importFrom ggplot2 fortify
##' @importFrom vegan scores
Expand Down
3 changes: 1 addition & 2 deletions R/fortify.prc.R
Expand Up @@ -23,8 +23,7 @@
##' in plotting.
##' @author Gavin L. Simpson
##'
##' @method fortify prc
##' @S3method fortify prc
##' @export
##'
##' @importFrom ggplot2 fortify
##' @importFrom reshape2 melt
Expand Down
34 changes: 17 additions & 17 deletions man/autoplot.cca.Rd
@@ -1,3 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/autoplot.cca.R
\name{autoplot.cca}
\alias{autoplot.cca}
\title{ggplot-based plot for objects of class \code{"cca"}}
Expand All @@ -7,34 +9,32 @@
...)
}
\arguments{
\item{object}{an object of class \code{"cca"}, the result
of a call to \code{\link[vegan]{cca}}.}
\item{object}{an object of class \code{"cca"}, the result of a call
to \code{\link[vegan]{cca}}.}

\item{geom}{character; which geoms to use for the layers.
Can be a vector of length equal to
\code{length(display)}, in which case the \emph{i}th
element of \code{type} refers to the \emph{i}th element
of \code{display}.}
\item{geom}{character; which geoms to use for the layers. Can be a
vector of length equal to \code{length(display)}, in which case the
\emph{i}th element of \code{type} refers to the \emph{i}th element
of \code{display}.}

\item{layers}{character; which scores to plot as layers}
\item{layers}{character; which scores to plot as layers}

\item{xlab}{character; label for the x-axis}
\item{ylab}{character; label for the y-axis}

\item{ylab}{character; label for the y-axis}
\item{xlab}{character; label for the x-axis}

\item{const}{General scaling constant to \code{rda}
scores. See \code{\link[vegan]{plot.cca}} for details.}
\item{const}{General scaling constant to \code{rda} scores. See
\code{\link[vegan]{plot.cca}} for details.}

\item{...}{Additional arguments passed to
\code{\link{fortify.cca}}.}
\item{...}{Additional arguments passed to \code{\link{fortify.cca}}.}
}
\value{
Returns a ggplot object.
}
\description{
Produces a multi-layer ggplot object representing the
output of objects produced by \code{\link[vegan]{cca}},
\code{\link[vegan]{rda}}, or \code{\link[vegan]{capscale}}.
Produces a multi-layer ggplot object representing the output of
objects produced by \code{\link[vegan]{cca}}, \code{\link[vegan]{rda}},
or \code{\link[vegan]{capscale}}.
}
\details{
TODO
Expand Down
28 changes: 14 additions & 14 deletions man/autoplot.metaMDS.Rd
@@ -1,3 +1,5 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/autoplot.metaMDS.R
\name{autoplot.metaMDS}
\alias{autoplot.metaMDS}
\title{ggplot-based plot for objects of class \code{"metaMDS"}}
Expand All @@ -6,30 +8,28 @@
layers = c("species", "sites"), ylab, xlab, ...)
}
\arguments{
\item{object}{an object of class \code{"metaMDS"}, the
result of a call to \code{\link[vegan]{metaMDS}}.}
\item{object}{an object of class \code{"metaMDS"}, the result of a call
to \code{\link[vegan]{metaMDS}}.}

\item{geom}{character; which geoms to use for the layers.
Can be a vector of length equal to
\code{length(display)}, in which case the \emph{i}th
element of \code{type} refers to the \emph{i}th element
of \code{display}.}
\item{geom}{character; which geoms to use for the layers. Can be a
vector of length equal to \code{length(display)}, in which case the
\emph{i}th element of \code{type} refers to the \emph{i}th element
of \code{display}.}

\item{layers}{character; which scores to plot as layers}
\item{layers}{character; which scores to plot as layers}

\item{xlab}{character; label for the x-axis}
\item{ylab}{character; label for the y-axis}

\item{ylab}{character; label for the y-axis}
\item{xlab}{character; label for the x-axis}

\item{...}{Additional arguments passed to
\code{\link{fortify.metaMDS}}.}
\item{...}{Additional arguments passed to \code{\link{fortify.metaMDS}}.}
}
\value{
Returns a ggplot object.
}
\description{
Produces a multi-layer ggplot object representing the
output of objects produced by \code{\link[vegan]{metaMDS}}.
Produces a multi-layer ggplot object representing the output of
objects produced by \code{\link[vegan]{metaMDS}}.
}
\details{
TODO
Expand Down
33 changes: 16 additions & 17 deletions man/autoplot.prc.Rd
@@ -1,37 +1,36 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/autoplot.prc.R
\name{autoplot.prc}
\alias{autoplot.prc}
\title{ggplot-based plot for objects of class \code{"prc"}}
\usage{
\method{autoplot}{prc}(object, select, xlab, ylab, leg.pos = "top", ...)
}
\arguments{
\item{object}{an object inheriting from class
\code{"prc"}, the result of a call to
\code{\link[vegan]{prc}}.}
\item{object}{an object inheriting from class \code{"prc"}, the
result of a call to \code{\link[vegan]{prc}}.}

\item{select}{a logical vector where \code{TRUE} selects
and \code{FALSE} deselects species. Alternatively a
numeric vector that contains the indices selecting
species. Note that these are with respect to the original
species matrix, \strong{not} the fortified object.}
\item{select}{a logical vector where \code{TRUE} selects and
\code{FALSE} deselects species. Alternatively a numeric vector that
contains the indices selecting species. Note that these are with
respect to the original species matrix, \strong{not} the fortified
object.}

\item{xlab}{character; label for the x-axis}
\item{xlab}{character; label for the x-axis}

\item{ylab}{character; label for the y-axis}
\item{ylab}{character; label for the y-axis}

\item{leg.pos}{character; position for the legend grob.
See argument \code{legend.position} in function
\code{\link[ggplot2]{theme}}.}
\item{leg.pos}{character; position for the legend grob. See argument
\code{legend.position} in function \code{\link[ggplot2]{theme}}.}

\item{...}{Additional arguments passed to
\code{\link{fortify.prc}}.}
\item{...}{Additional arguments passed to \code{\link{fortify.prc}}.}
}
\value{
Returns a ggplot object.
}
\description{
Produces a multi-layer ggplot object representing the
output of objects produced by \code{\link[vegan]{prc}}.
Produces a multi-layer ggplot object representing the output of
objects produced by \code{\link[vegan]{prc}}.
}
\details{
TODO
Expand Down
24 changes: 12 additions & 12 deletions man/fortify.cca.Rd
@@ -1,28 +1,28 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/fortify.cca.R
\name{fortify.cca}
\alias{fortify.cca}
\title{Fortify a \code{"cca"} object.}
\usage{
\method{fortify}{cca}(model, data, ...)
}
\arguments{
\item{model}{an object of class \code{"cca"}, the result
of a call to \code{\link[vegan]{cca}},
\code{\link[vegan]{rda}}, or
\code{\link[vegan]{capscale}}.}
\item{model}{an object of class \code{"cca"}, the result of a call to
\code{\link[vegan]{cca}}, \code{\link[vegan]{rda}}, or
\code{\link[vegan]{capscale}}.}

\item{data}{currently ignored.}
\item{data}{currently ignored.}

\item{...}{additional arguments passed to
\code{\link[vegan]{scores.cca}}.}
\item{...}{additional arguments passed to \code{\link[vegan]{scores.cca}}.}
}
\value{
A data frame in long format containing the ordination
scores. The first two components are the axis scores.
A data frame in long format containing the ordination scores.
The first two components are the axis scores.
}
\description{
Fortifies an object of class \code{"cca"} to produce a data
frame of the selected axis scores in long format, suitable
for plotting with \code{\link[ggplot2]{ggplot}}.
Fortifies an object of class \code{"cca"} to produce a
data frame of the selected axis scores in long format, suitable for
plotting with \code{\link[ggplot2]{ggplot}}.
}
\details{
TODO
Expand Down
21 changes: 11 additions & 10 deletions man/fortify.metaMDS.Rd
@@ -1,27 +1,28 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/fortify.metaMDS.R
\name{fortify.metaMDS}
\alias{fortify.metaMDS}
\title{Fortify a \code{"mataMDS"} object.}
\usage{
\method{fortify}{metaMDS}(model, data, ...)
}
\arguments{
\item{model}{an object of class \code{"metaMDS"}, the
result of a call to \code{\link[vegan]{metaMDS}}.}
\item{model}{an object of class \code{"metaMDS"}, the result of a call
to \code{\link[vegan]{metaMDS}}.}

\item{data}{currently ignored.}
\item{data}{currently ignored.}

\item{...}{additional arguments passed to
\code{\link[vegan]{scores.metaMDS}}. Note you can't use
\code{display}.}
\item{...}{additional arguments passed to
\code{\link[vegan]{scores.metaMDS}}. Note you can't use \code{display}.}
}
\value{
A data frame in long format containing the ordination
scores. The first two components are the axis scores.
A data frame in long format containing the ordination scores.
The first two components are the axis scores.
}
\description{
Fortifies an object of class \code{"metaMDS"} to produce a
data frame of the selected axis scores in long format,
suitable for plotting with \code{\link[ggplot2]{ggplot}}.
data frame of the selected axis scores in long format, suitable for
plotting with \code{\link[ggplot2]{ggplot}}.
}
\details{
TODO
Expand Down
36 changes: 18 additions & 18 deletions man/fortify.prc.Rd
@@ -1,36 +1,36 @@
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/fortify.prc.R
\name{fortify.prc}
\alias{fortify.prc}
\title{Fortify a \code{"prc"} object}
\usage{
\method{fortify}{prc}(model, data, scaling = 3, axis = 1, ...)
}
\arguments{
\item{model}{an object of class \code{"prc"}, the result
of a call to \code{\link[vegan]{prc}}.}
\item{model}{an object of class \code{"prc"}, the result of a call to
\code{\link[vegan]{prc}}.}

\item{data}{currently ignored.}
\item{data}{currently ignored.}

\item{scaling}{the desired scaling. See
\code{\link{scores.cca}} for details.}
\item{scaling}{the desired scaling. See \code{\link{scores.cca}} for
details.}

\item{axis}{numeric; which PRC axis to extract. Default
is \code{axis = 1}, which is the most generally useful
choice.}
\item{axis}{numeric; which PRC axis to extract. Default is
\code{axis = 1}, which is the most generally useful choice.}

\item{...}{additional arguments currently ignored.}
\item{...}{additional arguments currently ignored.}
}
\value{
A data frame in long format containing the ordination
scores. The first three components are the \code{Time},
\code{Treatment}, and associated \code{Response}. The last
two components, \code{Score} and \code{Label} are an
indictor factor and a label for the rows for use in
plotting.
A data frame in long format containing the ordination scores.
The first three components are the \code{Time}, \code{Treatment}, and
associated \code{Response}. The last two components, \code{Score} and
\code{Label} are an indictor factor and a label for the rows for use
in plotting.
}
\description{
Fortifies an object of class \code{"prc"} to produce a data
frame of the selected axis scores in long format, suitable
for plotting with \code{\link[ggplot2]{ggplot}}.
Fortifies an object of class \code{"prc"} to produce a
data frame of the selected axis scores in long format, suitable for
plotting with \code{\link[ggplot2]{ggplot}}.
}
\details{
TODO
Expand Down

0 comments on commit 0688ce2

Please sign in to comment.