Workaround for usage of MATLAB any() (#25)
This commit is contained in:
parent
b75d38fee4
commit
bcdfc5d22d
2 changed files with 2 additions and 2 deletions
|
|
@ -129,7 +129,7 @@ indMix <- function(c, npops, counts = NULL, sumcounts = NULL, max_iter = 100L, d
|
||||||
while (ready != 1) {
|
while (ready != 1) {
|
||||||
iter <- iter + 1L
|
iter <- iter + 1L
|
||||||
if (iter > max_iter) {
|
if (iter > max_iter) {
|
||||||
warning("max_iter reached. Stopping.")
|
warning("max_iter reached. Stopping prematurely.")
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
# FIXME: loop caught in here
|
# FIXME: loop caught in here
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
poistaTyhjatPopulaatiot <- function(npops) {
|
poistaTyhjatPopulaatiot <- function(npops) {
|
||||||
# % Poistaa tyhjentyneet populaatiot COUNTS:ista ja
|
# % Poistaa tyhjentyneet populaatiot COUNTS:ista ja
|
||||||
# % SUMCOUNTS:ista. P<>ivitt<74><74> npops:in ja PARTITION:in.
|
# % SUMCOUNTS:ista. P<>ivitt<74><74> npops:in ja PARTITION:in.
|
||||||
notEmpty <- matlab2r::find(any(SUMCOUNTS, 2))
|
notEmpty <- matlab2r::find(apply(SUMCOUNTS, 1, function(x) any(x > 0)))
|
||||||
COUNTS <- COUNTS[, , notEmpty]
|
COUNTS <- COUNTS[, , notEmpty]
|
||||||
SUMCOUNTS <- SUMCOUNTS[notEmpty, ]
|
SUMCOUNTS <- SUMCOUNTS[notEmpty, ]
|
||||||
LOGDIFF <- LOGDIFF[, notEmpty]
|
LOGDIFF <- LOGDIFF[, notEmpty]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue