[Zooimage-commits] r204 - pkg/zooimage/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 19 14:17:32 CEST 2012
Author: kevin
Date: 2012-06-19 14:17:32 +0200 (Tue, 19 Jun 2012)
New Revision: 204
Modified:
pkg/zooimage/R/ZIRes.R
Log:
Modification of sampleAbd because sapply function doesn't return the total abundance --> Add a condition to check if total is null or not.
Modified: pkg/zooimage/R/ZIRes.R
===================================================================
--- pkg/zooimage/R/ZIRes.R 2012-06-18 14:23:12 UTC (rev 203)
+++ pkg/zooimage/R/ZIRes.R 2012-06-19 12:17:32 UTC (rev 204)
@@ -584,6 +584,8 @@
} else {
sapply(groups, function (g)
sum(Smp$Coef[Smp[, Predictions] %in% g]))
+ # problem with sapply function: total = 0!!!!!
+ if(isTRUE(as.numeric(res["total"]) == 0)) res["total"] <- sum(Smp$Coef)
}
names(res) <- paste(header, names(groups))
}
More information about the Zooimage-commits
mailing list