[Vegan-commits] r1475 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 31 20:24:37 CET 2011
Author: jarioksa
Date: 2011-01-31 20:24:36 +0100 (Mon, 31 Jan 2011)
New Revision: 1475
Modified:
pkg/vegan/R/kendall.post.R
pkg/vegan/R/nestedtemp.R
pkg/vegan/R/ordiplot3d.R
pkg/vegan/R/orditkplot.R
pkg/vegan/R/plot.cascadeKM.R
pkg/vegan/R/plot.cca.R
pkg/vegan/R/prestondistr.R
pkg/vegan/R/print.MOStest.R
pkg/vegan/R/rgl.renyiaccum.R
pkg/vegan/R/showvarparts.R
Log:
R 2.13.0 (under development) warns on partially matched arguments
Modified: pkg/vegan/R/kendall.post.R
===================================================================
--- pkg/vegan/R/kendall.post.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/kendall.post.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -43,7 +43,7 @@
##CC# Initialize the counters
counter <- as.list(1:ngr)
for(i in 1:ngr){
- counter[[i]] <- vector(l=n.per.gr[i])
+ counter[[i]] <- vector(length = n.per.gr[i])
}
W.gr <- vector("list",ngr)
if(ngr > 1) spear.gr <- vector("list",ngr)
Modified: pkg/vegan/R/nestedtemp.R
===================================================================
--- pkg/vegan/R/nestedtemp.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/nestedtemp.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -11,7 +11,7 @@
ind <- matrix(rep(rr, ncol(x)), nrow=nrow(x))
s <- -colSums((x*ind)^2)
t <- -colSums((nrow(x) - (1-x)*ind + 1)^2)
- st <- rank(s+t, ties="random")
+ st <- rank(s+t, ties.method = "random")
st
}
rowpack <- function(x, cr)
@@ -19,15 +19,15 @@
ind <- matrix(rep(cr, each=nrow(x)), nrow=nrow(x))
s <- -rowSums((x*ind)^2)
t <- -rowSums((ncol(x) - (1-x)*ind + 1)^2)
- st <- rank(s+t, ties="random")
+ st <- rank(s+t, ties.method = "random")
st
}
comm <- ifelse(comm > 0, 1, 0)
## Start with columns, expect if nrow > ncol
if (ncol(comm) >= nrow(comm)) {
- i <- rank(-rowSums(comm), ties="average")
+ i <- rank(-rowSums(comm), ties.method = "average")
} else {
- j <- rank(-colSums(comm), ties="average")
+ j <- rank(-colSums(comm), ties.method = "average")
i <- rowpack(comm, j)
}
## Improve eight times
Modified: pkg/vegan/R/ordiplot3d.R
===================================================================
--- pkg/vegan/R/ordiplot3d.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/ordiplot3d.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -31,7 +31,7 @@
mul <- ordiArrowMul(cbind(tmp$x, tmp$y), fill=1)
bp.xyz <- pl$xyz.convert(bp * mul)
orig <- pl$xyz.convert(0, 0, 0)
- arrows(orig$x, orig$y, bp.xyz$x, bp.xyz$y, len = arr.len,
+ arrows(orig$x, orig$y, bp.xyz$x, bp.xyz$y, length = arr.len,
col = arr.col)
}
}
Modified: pkg/vegan/R/orditkplot.R
===================================================================
--- pkg/vegan/R/orditkplot.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/orditkplot.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -266,11 +266,11 @@
eps = postscript(file=fname, width=xy$dim[1], height=xy$dim[2],
paper="special", horizontal = FALSE),
pdf = pdf(file=fname, width=xy$dim[1], height=xy$dim[2]),
- png = png(file=fname, width=pixdim[1], height=pixdim[2]),
- jpg = jpeg(file=fname, width=pixdim[1], height=pixdim[2],
+ png = png(filename=fname, width=pixdim[1], height=pixdim[2]),
+ jpg = jpeg(filename=fname, width=pixdim[1], height=pixdim[2],
quality = 100),
- tiff = tiff(file=fname, width=pixdim[1], height=pixdim[2]),
- bmp = bmp(file=fname, width=pixdim[1], height=pixdim[2]),
+ tiff = tiff(filename=fname, width=pixdim[1], height=pixdim[2]),
+ bmp = bmp(filename=fname, width=pixdim[1], height=pixdim[2]),
fig = xfig(file=fname, width=xy$dim[1], height=xy$dim[2]))
plot.orditkplot(xy)
dev.off()
Modified: pkg/vegan/R/plot.cascadeKM.R
===================================================================
--- pkg/vegan/R/plot.cascadeKM.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/plot.cascadeKM.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -25,8 +25,6 @@
if (sortg) {
x <- orderingKM(x)
}
- else {
- }
main = (paste("K-means partitions comparison"))
xlab = ("Number of groups in each partition")
ylab = ("Objects")
@@ -42,7 +40,7 @@
grid(nx = nrow(x), ny = max.g - min.g + 1, col = gridcol)
box()
axis(2, seq(min.g - min.g + 1, max.g - min.g + 1, by = 1),
- lab = seq(min.g, max.g, by = 1))
+ labels = seq(min.g, max.g, by = 1))
axis(1)
par(mar = c(5, 2, 5, 1))
par(bg = "white", fg = "black", col = "black")
@@ -51,7 +49,7 @@
0.5, max.g + 0.5), yaxs = "i", yaxt = "n", xlab = "Values")
grid(nx = NULL, ny = max.g - min.g + 1, col = gridcol)
box()
- axis(2, seq(min.g, max.g, by = 1), lab = seq(min.g, max.g,
+ axis(2, seq(min.g, max.g, by = 1), labels = seq(min.g, max.g,
by = 1), col.axis = "black")
axis(1)
maxx = which.max(w[])
Modified: pkg/vegan/R/plot.cca.R
===================================================================
--- pkg/vegan/R/plot.cca.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/plot.cca.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -88,7 +88,7 @@
else mul <- 1
attr(g$biplot, "arrow.mul") <- mul
arrows(0, 0, mul * g$biplot[, 1], mul * g$biplot[, 2],
- len = 0.05, col = "blue")
+ length = 0.05, col = "blue")
text(1.1 * mul * g$biplot, rownames(g$biplot), col = "blue")
axis(3, at = c(-mul, 0, mul), labels = rep("", 3), col = "blue")
axis(4, at = c(-mul, 0, mul), labels = c(-1, 0, 1), col = "blue")
Modified: pkg/vegan/R/prestondistr.R
===================================================================
--- pkg/vegan/R/prestondistr.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/prestondistr.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -3,7 +3,7 @@
{
fun <- function(par, x, truncate) {
up <- dnorm(x, par[1], par[2], log = TRUE)
- dn <- pnorm(truncate, par[1], par[2], lower = FALSE)
+ dn <- pnorm(truncate, par[1], par[2], lower.tail = FALSE)
-sum(up - log(dn))
}
x <- x[x > 0]
@@ -11,7 +11,7 @@
p <- c(mean(logx), sd(logx))
sol <- optim(p, fun, x = logx, truncate = truncate)
p <- sol$par
- area <- pnorm(truncate, p[1], p[2], lower = FALSE)
+ area <- pnorm(truncate, p[1], p[2], lower.tail = FALSE)
scale <- length(x)/sqrt(2 * pi)/p[2]/area
p <- c(p, scale)
oct <- as.preston(x, ...)
Modified: pkg/vegan/R/print.MOStest.R
===================================================================
--- pkg/vegan/R/print.MOStest.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/print.MOStest.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -8,6 +8,6 @@
if (!x$isBracketed)
cat("***** Caution: hump/pit not bracketed by the data ******\n")
cat("\n")
- printCoefmat(coef(x), has.P=TRUE, na.print="")
+ printCoefmat(coef(x), has.Pvalue = TRUE, na.print = "")
invisible(x)
}
Modified: pkg/vegan/R/rgl.renyiaccum.R
===================================================================
--- pkg/vegan/R/rgl.renyiaccum.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/rgl.renyiaccum.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -11,7 +11,7 @@
ylen <- ylim[2] - ylim[1] + 1
colorlut <- rainbow(ylen)
col <- colorlut[1000*y-ylim[1]+1]
- rgl.bg(col="white")
+ rgl.bg(color = "white")
rgl.surface(xp, z, y, color=col)
y <- x[,,5] * rgl.height
##rgl.surface(xp,z,y,color="grey", alpha=0.3)
Modified: pkg/vegan/R/showvarparts.R
===================================================================
--- pkg/vegan/R/showvarparts.R 2011-01-31 17:02:40 UTC (rev 1474)
+++ pkg/vegan/R/showvarparts.R 2011-01-31 19:24:36 UTC (rev 1475)
@@ -15,9 +15,9 @@
box()
symbols(cp, circles = rep(rad, min(parts,3)), inches = FALSE, add=TRUE, ...)
if (parts == 4) {
- symbols(0, 0.2, rectangles=cbind(1, 0.5), inch=FALSE, add=TRUE, ...)
+ symbols(0, 0.2, rectangles=cbind(1, 0.5), inches=FALSE, add=TRUE, ...)
symbols(sqrt(1/2), -sqrt(3/4)+0.2, rectangles=cbind(0.5,0.3),
- inch=FALSE, add=TRUE, ...)
+ inches=FALSE, add=TRUE, ...)
}
nlabs <- switch(parts, 2, 4, 8, 16)
if (missing(labels))
More information about the Vegan-commits
mailing list