[Vegan-commits] r2610 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Sep 9 10:05:19 CEST 2013
Author: jarioksa
Date: 2013-09-09 10:05:19 +0200 (Mon, 09 Sep 2013)
New Revision: 2610
Modified:
pkg/vegan/R/simulate.rda.R
Log:
simulated matrix must be transposed
Modified: pkg/vegan/R/simulate.rda.R
===================================================================
--- pkg/vegan/R/simulate.rda.R 2013-09-09 06:42:40 UTC (rev 2609)
+++ pkg/vegan/R/simulate.rda.R 2013-09-09 08:05:19 UTC (rev 2610)
@@ -55,8 +55,8 @@
ans[,,i] <- as.matrix(ftd + matrix(rnorm(length(ftd), sd = dev),
nrow = nrow(ftd)))
else {
- ans[,,i] <- apply(ftd, 1,
- function(x) mvrnorm(1, mu = x, Sigma = dev))
+ ans[,,i] <- t(apply(ftd, 1,
+ function(x) mvrnorm(1, mu = x, Sigma = dev)))
}
}
## set RNG attributes
More information about the Vegan-commits
mailing list