[Analogue-commits] r305 - in pkg: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 18 03:42:27 CET 2013
Author: gsimpson
Date: 2013-03-18 03:42:26 +0100 (Mon, 18 Mar 2013)
New Revision: 305
Modified:
pkg/R/gradientDist.R
pkg/man/gradientDist.Rd
Log:
fix a silly bug in prcurve method, removes 'order' argument
Modified: pkg/R/gradientDist.R
===================================================================
--- pkg/R/gradientDist.R 2013-03-18 02:41:22 UTC (rev 304)
+++ pkg/R/gradientDist.R 2013-03-18 02:42:26 UTC (rev 305)
@@ -6,11 +6,8 @@
UseMethod("gradientDist")
}
-gradientDist.default <- function(object, order, na.rm = TRUE, ...) {
+gradientDist.default <- function(object, na.rm = TRUE, ...) {
object <- as.vector(object)
- if(missing(order))
- order <- seq_along(object)
- object <- object[order]
minD <- min(object, na.rm = na.rm)
k <- if(any(object < 0, na.rm = na.rm)) {
minD
@@ -30,6 +27,7 @@
scaling = 0, ...) {
if(length(axis) > 1L) {
axis <- axis[1L]
+ warning("Only the first element of `axis` used.")
}
scrs <- as.vector(scores(object, choices = axis, scaling = scaling,
display = "sites", ...))
@@ -37,7 +35,6 @@
}
gradientDist.prcurve <- function(object, na.rm = TRUE, ...) {
- order <- object$tag
- scrs <- object$lambda
- gradientDist.default(scrs, order, na.rm = na.rm, ...)
+ scrs <- scores(object)
+ gradientDist.default(scrs, na.rm = na.rm, ...)
}
Modified: pkg/man/gradientDist.Rd
===================================================================
--- pkg/man/gradientDist.Rd 2013-03-18 02:41:22 UTC (rev 304)
+++ pkg/man/gradientDist.Rd 2013-03-18 02:42:26 UTC (rev 305)
@@ -16,7 +16,7 @@
\usage{
gradientDist(object, \dots)
-\method{gradientDist}{default}(object, order, na.rm = TRUE, \dots)
+\method{gradientDist}{default}(object, na.rm = TRUE, \dots)
\method{gradientDist}{cca}(object, na.rm = TRUE, axis = 1L,
scaling = 0, \dots)
@@ -27,8 +27,6 @@
\arguments{
\item{object}{an R object of an appropriate type. For the default
method, any R object that can be coerced to a vector.}
- \item{order}{numeric vector indicating the ordering of points along
- the gradient.}
\item{na.rm}{logical; should missing values be removed?}
\item{axis}{numeric, length 1; the ordination axis to take as the
gradient.}
More information about the Analogue-commits
mailing list