[Vegan-commits] r1878 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 23 07:15:37 CEST 2011
Author: psolymos
Date: 2011-09-23 07:15:36 +0200 (Fri, 23 Sep 2011)
New Revision: 1878
Modified:
pkg/vegan/R/make.commsim.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/commsim.Rd
Log:
storage mode changes
Modified: pkg/vegan/R/make.commsim.R
===================================================================
--- pkg/vegan/R/make.commsim.R 2011-09-23 05:15:07 UTC (rev 1877)
+++ pkg/vegan/R/make.commsim.R 2011-09-23 05:15:36 UTC (rev 1878)
@@ -293,18 +293,18 @@
out
}),
"r00_samp" = commsim(method="r00_samp", binary=FALSE, isSeq=FALSE,
- mode="integer",
+ mode="double",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
- out <- matrix(0L, nr * nc, n)
+ out <- matrix(0, nr * nc, n)
for (k in seq_len(n))
out[, k] <- sample(x)
dim(out) <- c(nr, nc, n)
out
}),
"c0_samp" = commsim(method="c0_samp", binary=FALSE, isSeq=FALSE,
- mode="integer",
+ mode="double",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
- out <- array(0L, c(nr, nc, n))
+ out <- array(0, c(nr, nc, n))
J <- seq_len(nc)
for (k in seq_len(n))
for (j in J)
@@ -312,9 +312,9 @@
out
}),
"r0_samp" = commsim(method="r0_samp", binary=FALSE, isSeq=FALSE,
- mode="integer",
+ mode="double",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
- out <- array(0L, c(nr, nc, n))
+ out <- array(0, c(nr, nc, n))
I <- seq_len(nr)
for (k in seq_len(n))
for (i in I)
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2011-09-23 05:15:07 UTC (rev 1877)
+++ pkg/vegan/inst/ChangeLog 2011-09-23 05:15:36 UTC (rev 1878)
@@ -4,6 +4,16 @@
Version 2.1-1 (opened September 20, 2011)
+ * permatfull/swap is using the new simulate(nullmodel(...)...)
+ infrastructure. permatfull1 and permatswap1 removed from vegan
+ devel.
+
+ * Value of 'mode' is set to "double" for the following
+ null model algorithms in make.commsim: abuswap_r, abuswap_c,
+ r00_samp, r0_samp, c0_samp. These can take any nonnegative real
+ valued matrix as input. nullmodel function now handles storage
+ mode reliably.
+
* meandist bug fix: tapply() function used to find mean group x
group dissimilarities could reorder the class levels and return a
confused matrix. This could happen in particular when the
Modified: pkg/vegan/man/commsim.Rd
===================================================================
--- pkg/vegan/man/commsim.Rd 2011-09-23 05:15:07 UTC (rev 1877)
+++ pkg/vegan/man/commsim.Rd 2011-09-23 05:15:36 UTC (rev 1878)
@@ -199,7 +199,8 @@
modified by shuffling original nonzero samples among the new
nonzero cells of the binary matrix, individuals of the
nonzero cells are also shuffled, separately for each columns.}
- \item{\code{"abuswap_r"}: }{sequential algorithm for count matrices
+ \item{\code{"abuswap_r"}: }{sequential algorithm for count
+ or nonnegative real valued (\code{mode = "double"}) matrices
described in the page of \code{\link{permatswap}} (\code{"abuswap"}
algorithm with fixed row freqencies).
The algorithm produces matrices by swapping
@@ -207,7 +208,8 @@
column sums, but honours matrix fill, row sums,
and row/column frequencies,
as described in Hardy (2008; randomization scheme 2x).}
- \item{\code{"abuswap_c"}: }{sequential algorithm for count matrices
+ \item{\code{"abuswap_c"}: }{sequential algorithm for count
+ or nonnegative real valued (\code{mode = "double"}) matrices
described in the page of \code{\link{permatswap}} (\code{"abuswap"}
algorithm with fixed column freqencies).
The algorithm produces matrices by swapping
@@ -231,15 +233,18 @@
described in the page of \code{\link{permatfull}}.
This algorithm keeps column sums constant,
individuals are shullfed among cells of each column of the matrix.}
- \item{\code{"r00_samp"}: }{non-sequential algorithm for count matrices
+ \item{\code{"r00_samp"}: }{non-sequential algorithm for count
+ or nonnegative real valued (\code{mode = "double"}) matrices
described in the page of \code{\link{permatfull}}.
This algorithm keeps total sum constant,
cells of the matrix are shuffled.}
- \item{\code{"r0_samp"}: }{non-sequential algorithm for count matrices
+ \item{\code{"r0_samp"}: }{non-sequential algorithm for count
+ or nonnegative real valued (\code{mode = "double"}) matrices
described in the page of \code{\link{permatfull}}.
This algorithm keeps row sums constant,
cells within each row are shuffled.}
- \item{\code{"c0_samp"}: }{non-sequential algorithm for count matrices
+ \item{\code{"c0_samp"}: }{non-sequential algorithm for count
+ or nonnegative real valued (\code{mode = "double"}) matrices
described in the page of \code{\link{permatfull}}.
This algorithm keeps column sums constant,
cells within each columns are shuffled.}
More information about the Vegan-commits
mailing list