[Vegan-commits] r2879 - in pkg/vegan: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Sep 3 11:36:53 CEST 2014
Author: jarioksa
Date: 2014-09-03 11:36:53 +0200 (Wed, 03 Sep 2014)
New Revision: 2879
Added:
pkg/vegan/.Rbuildignore
pkg/vegan/.travis.yml
pkg/vegan/README.md
Modified:
pkg/vegan/DESCRIPTION
pkg/vegan/NAMESPACE
pkg/vegan/R/bioenv.default.R
pkg/vegan/R/confint.MOStest.R
pkg/vegan/R/goodness.metaMDS.R
pkg/vegan/R/metaMDSiter.R
pkg/vegan/R/ordirgl.R
pkg/vegan/R/ordisurf.R
pkg/vegan/R/plot.spantree.R
pkg/vegan/R/rankindex.R
pkg/vegan/R/rgl.isomap.R
pkg/vegan/R/rgl.renyiaccum.R
pkg/vegan/R/scores.lda.R
pkg/vegan/R/simulate.rda.R
pkg/vegan/R/stressplot.R
pkg/vegan/R/tabasco.R
pkg/vegan/R/vegemite.R
pkg/vegan/man/ordisurf.Rd
Log:
Merge branch 'master' into r-forge-svn-local
Added: pkg/vegan/.Rbuildignore
===================================================================
--- pkg/vegan/.Rbuildignore (rev 0)
+++ pkg/vegan/.Rbuildignore 2014-09-03 09:36:53 UTC (rev 2879)
@@ -0,0 +1,3 @@
+LICENSE
+^\.travis\.yml$
+
Added: pkg/vegan/.travis.yml
===================================================================
--- pkg/vegan/.travis.yml (rev 0)
+++ pkg/vegan/.travis.yml 2014-09-03 09:36:53 UTC (rev 2879)
@@ -0,0 +1,24 @@
+# Sample .travis.yml for R projects.
+#
+# See README.md for instructions, or for more configuration options,
+# see the wiki:
+# https://github.com/craigcitro/r-travis/wiki
+
+language: c
+
+before_install:
+ - curl -OL http://raw.github.com/craigcitro/r-travis/master/scripts/travis-tool.sh
+ - chmod 755 ./travis-tool.sh
+ - ./travis-tool.sh bootstrap
+install:
+ - ./travis-tool.sh install_deps
+script: ./travis-tool.sh run_tests
+
+after_failure:
+ - ./travis-tool.sh dump_logs
+
+notifications:
+ email:
+ on_success: change
+ on_failure: change
+
Modified: pkg/vegan/DESCRIPTION
===================================================================
--- pkg/vegan/DESCRIPTION 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/DESCRIPTION 2014-09-03 09:36:53 UTC (rev 2879)
@@ -7,7 +7,8 @@
M. Henry H. Stevens, Helene Wagner
Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>
Depends: permute (>= 0.7-8), lattice, R (>= 2.15.0)
-Suggests: MASS, mgcv, cluster, parallel, scatterplot3d, rgl, tcltk
+Suggests: parallel, scatterplot3d, tcltk
+Imports: MASS, rgl, cluster, mgcv
Description: Ordination methods, diversity analysis and other
functions for community and vegetation ecologists.
License: GPL-2
Modified: pkg/vegan/NAMESPACE
===================================================================
--- pkg/vegan/NAMESPACE 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/NAMESPACE 2014-09-03 09:36:53 UTC (rev 2879)
@@ -61,17 +61,20 @@
## ordiParseFormula, ordiTerminfo, pregraphKM, simpleRDA2, varpart2,
## varpart3, varpart4, veganCovEllipse, veganMahatrans)
-## Registration of S3 methods
+## Imports
import(stats)
import(graphics)
import(permute)
importFrom(utils, head, tail, str)
importFrom(tools, Rd2txt, startDynamicHelp)
import(lattice)
-## nobs only exists in R 2.13.0 -- import from permute with older R
-if (getRversion() < "2.13.0") {
- importFrom(permute, nobs)
-}
+import(parallel)
+import(tcltk)
+importFrom(MASS, isoMDS, sammon, Shepard, mvrnorm)
+import(rgl)
+importFrom(cluster, daisy)
+importFrom(mgcv, gam)
+## Registration of S3 methods defined in vegan
# adipart: vegan
S3method(adipart, default)
S3method(adipart, formula)
Modified: pkg/vegan/R/bioenv.default.R
===================================================================
--- pkg/vegan/R/bioenv.default.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/bioenv.default.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -47,8 +47,6 @@
x <- as.matrix(scale(env, scale = FALSE))
distfun <- function(x) dist(veganMahatrans(x))
} else if (metric == "gower") {
- require(cluster) ||
- stop("package 'cluster' needed for factor variables in 'env'")
x <- env
distfun <- function(x) daisy(x, metric = "gower")
} else if (metric == "manhattan") {
@@ -142,9 +140,6 @@
## any non-numeric argument is regarded as "best"
if(!is.numeric(which))
which <- x$whichbest
- if (x$metric == "gower")
- require(cluster) ||
- stop("requires package 'cluster' for 'gower' metric")
x$distfun(x$x[, x$models[[which]]$best, drop = FALSE])
}
Modified: pkg/vegan/R/confint.MOStest.R
===================================================================
--- pkg/vegan/R/confint.MOStest.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/confint.MOStest.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -1,6 +1,5 @@
`confint.MOStest` <-
function (object, parm = 1, level = 0.95, ...)
{
- require(MASS) || stop("requires packages MASS")
confint(profile(object), level = level, ...)
}
Modified: pkg/vegan/R/goodness.metaMDS.R
===================================================================
--- pkg/vegan/R/goodness.metaMDS.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/goodness.metaMDS.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -3,7 +3,6 @@
{
if (inherits(object, "monoMDS"))
return(NextMethod("goodness", object, ...))
- require(MASS) || stop("Needs MASS package")
if (missing(dis))
dis <- metaMDSredist(object)
if(attr(dis, "Size") != nrow(object$points))
Modified: pkg/vegan/R/metaMDSiter.R
===================================================================
--- pkg/vegan/R/metaMDSiter.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/metaMDSiter.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -4,8 +4,6 @@
parallel = getOption("mc.cores"), ...)
{
engine <- match.arg(engine, c("monoMDS", "isoMDS"))
- if (engine == "isoMDS")
- require(MASS) || stop("Needs package MASS (function isoMDS)")
EPS <- 0.05
if (engine == "monoMDS")
EPS <- EPS/100 # monoMDS stress (0,1), isoMDS (0,100)
Modified: pkg/vegan/R/ordirgl.R
===================================================================
--- pkg/vegan/R/ordirgl.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/ordirgl.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -2,8 +2,6 @@
function (object, display = "sites", choices = 1:3, type = "p",
ax.col = "red", arr.col = "yellow", text, envfit, ...)
{
- if (!require(rgl))
- stop("Requires package 'rgl'")
x <- scores(object, display = display, choices = choices,
...)
if (ncol(x) < 3)
Modified: pkg/vegan/R/ordisurf.R
===================================================================
--- pkg/vegan/R/ordisurf.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/ordisurf.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -33,7 +33,6 @@
w <- eval(w)
if (!is.null(w) && length(w) == 1)
w <- NULL
- require(mgcv) || stop("Requires package 'mgcv'")
X <- scores(x, choices = choices, display = display, ...)
## The original name of 'y' may be lost in handling NA: save for
## plots
Modified: pkg/vegan/R/plot.spantree.R
===================================================================
--- pkg/vegan/R/plot.spantree.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/plot.spantree.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -3,8 +3,6 @@
...)
{
FUNname <- deparse(substitute(FUN))
- if (length(FUNname) && FUNname %in% c("sammon", "isoMDS"))
- require(MASS) || stop(FUNname, "requires package MASS")
FUN <- match.fun(FUN)
n <- length(x$kid) + 1
if (missing(ord)) {
Modified: pkg/vegan/R/rankindex.R
===================================================================
--- pkg/vegan/R/rankindex.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/rankindex.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -4,12 +4,8 @@
metric = c("euclidean", "mahalanobis", "manhattan", "gower"), ...)
{
metric = match.arg(metric)
- if (metric == "gower")
- require(cluster) || stop("metric = 'gower' needs package 'cluster'")
grad <- as.data.frame(grad)
if (any(sapply(grad, is.factor))) {
- require(cluster) || stop("factors in 'grad' need package 'cluster'")
- message("'grad' included factors: used cluster:::daisy")
span <- daisy(grad)
} else {
span <- switch(metric,
Modified: pkg/vegan/R/rgl.isomap.R
===================================================================
--- pkg/vegan/R/rgl.isomap.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/rgl.isomap.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -1,7 +1,6 @@
`rgl.isomap` <-
function(x, web = "white", ...)
{
- require(rgl) || stop("requires package 'rgl'")
ordirgl(x, ...)
z <- scores(x, ...)
net <- x$net
Modified: pkg/vegan/R/rgl.renyiaccum.R
===================================================================
--- pkg/vegan/R/rgl.renyiaccum.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/rgl.renyiaccum.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -1,7 +1,6 @@
`rgl.renyiaccum` <-
function(x, rgl.height = 0.2, ...)
{
- require(rgl) || stop("requires packages 'rgl'")
y <- x[,,1] * rgl.height
rgl.min = 0
rgl.max = max(y)
Modified: pkg/vegan/R/scores.lda.R
===================================================================
--- pkg/vegan/R/scores.lda.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/scores.lda.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -1,7 +1,6 @@
`scores.lda` <-
function(x, display, ...)
{
- require(MASS) || stop("'lda' objects created in MASS need MASS for 'scores'")
display <- match.arg(display,
c("sites", "species", "scores", "predictors", "x", "coef"),
several.ok = TRUE)
Modified: pkg/vegan/R/simulate.rda.R
===================================================================
--- pkg/vegan/R/simulate.rda.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/simulate.rda.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -2,9 +2,6 @@
function(object, nsim = 1, seed = NULL, indx = NULL, rank = "full",
correlated = FALSE, ...)
{
- ## is.null(indx) && correlated requires MASS
- if(is.null(indx) && correlated)
- require(MASS) || stop("simulate options require MASS package")
## Handle RNG: code directly from stats::simulate.lm
if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
runif(1)
@@ -94,8 +91,6 @@
function(object, nsim = 1, seed = NULL, indx = NULL, rank = "full",
correlated = FALSE, ...)
{
- if (is.null(indx) && correlated)
- require(MASS) || stop("simulate options require MASS package")
## Handle RNG: code directly from stats::simulate.lm
if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
runif(1)
Modified: pkg/vegan/R/stressplot.R
===================================================================
--- pkg/vegan/R/stressplot.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/stressplot.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -79,7 +79,6 @@
if (!(inherits(object, "metaMDS") ||
all(c("points", "stress") %in% names(object))))
stop("can be used only with objects that are compatible with MASS::isoMDS results")
- require(MASS) || stop("Needs MASS package")
if (missing(dis))
if (inherits(object, "metaMDS"))
dis <- metaMDSredist(object)
Modified: pkg/vegan/R/tabasco.R
===================================================================
--- pkg/vegan/R/tabasco.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/tabasco.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -23,7 +23,6 @@
## but "hclust" is kept as "hclust": they differ in
## reorder()
if (inherits(use, "twins")) {
- require(cluster) || stop("package cluster needed to handle 'use'")
use <- as.dendrogram(use)
}
if (!is.null(site.ind))
@@ -88,7 +87,6 @@
## see if sp.ind is a dendrogram or hclust tree
if (inherits(sp.ind, c("hclust", "dendrogram", "twins"))) {
if (inherits(sp.ind, "twins")) {
- require("cluster") || stop("package cluster needed to handle 'sp.ind'")
sp.ind <- as.dendrogram(sp.ind)
}
sptree <- sp.ind
Modified: pkg/vegan/R/vegemite.R
===================================================================
--- pkg/vegan/R/vegemite.R 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/R/vegemite.R 2014-09-03 09:36:53 UTC (rev 2879)
@@ -11,7 +11,6 @@
}
else if (inherits(use, c("hclust", "twins"))) {
if (inherits(use, "twins")) {
- require(cluster) || stop("package cluster needed for 'use'")
use <- as.hclust(use)
}
if (is.null(site.ind))
Added: pkg/vegan/README.md
===================================================================
--- pkg/vegan/README.md (rev 0)
+++ pkg/vegan/README.md 2014-09-03 09:36:53 UTC (rev 2879)
@@ -0,0 +1,7 @@
+# vegan: an R package for community ecologists
+
+## Build status
+
+Linux | Windows
+------------|------------
+[![Build Status](https://travis-ci.org/vegandevs/vegan.svg?branch=master)](https://travis-ci.org/vegandevs/vegan) |
Modified: pkg/vegan/man/ordisurf.Rd
===================================================================
--- pkg/vegan/man/ordisurf.Rd 2014-09-01 06:59:06 UTC (rev 2878)
+++ pkg/vegan/man/ordisurf.Rd 2014-09-03 09:36:53 UTC (rev 2879)
@@ -299,6 +299,7 @@
## Plotting the "gam" object
plot(fit, what = "gam") ## 'col' and 'cex' not passed on
## or via plot.gam directly
+library(mgcv)
plot.gam(fit, cex = 2, pch = 1, col = "blue")
## 'col' effects all objects drawn...
More information about the Vegan-commits
mailing list