[Vegan-commits] r1826 - pkg/permute/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Sep 10 00:36:14 CEST 2011
Author: gsimpson
Date: 2011-09-10 00:36:14 +0200 (Sat, 10 Sep 2011)
New Revision: 1826
Modified:
pkg/permute/R/shuffle-utils.R
Log:
shuffleGrid was flipping even if mirror = FALSE when constant = TRUE
Modified: pkg/permute/R/shuffle-utils.R
===================================================================
--- pkg/permute/R/shuffle-utils.R 2011-09-09 22:31:00 UTC (rev 1825)
+++ pkg/permute/R/shuffle-utils.R 2011-09-09 22:36:14 UTC (rev 1826)
@@ -33,7 +33,7 @@
start.col <- shuffleFree(ncol, 1L)
ir <- seq(start.row, length=nrow) %% nrow
ic <- seq(start.col, length=ncol) %% ncol
- if(!is.null(flip)) {
+ if(!is.null(flip) && mirror) {
if(any(flip)) {
if(flip[1L])
ir <- rev(ir)
@@ -57,7 +57,7 @@
if(is.null(start))
start <- shuffleFree(n, 1L)
out <- seq(start, length = n) %% n + 1L
- if(!is.null(flip)) {
+ if(!is.null(flip) && mirror) {
if(flip)
out <- rev(out)
} else {
More information about the Vegan-commits
mailing list