[Zooimage-commits] r103 - pkg/zooimage/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Apr 21 14:29:44 CEST 2009


Author: romain
Date: 2009-04-21 14:29:43 +0200 (Tue, 21 Apr 2009)
New Revision: 103

Modified:
   pkg/zooimage/R/ZIRes.r
Log:
minor code update

Modified: pkg/zooimage/R/ZIRes.r
===================================================================
--- pkg/zooimage/R/ZIRes.r	2009-04-21 12:25:38 UTC (rev 102)
+++ pkg/zooimage/R/ZIRes.r	2009-04-21 12:29:43 UTC (rev 103)
@@ -300,10 +300,10 @@
 		names(res) <- header
 	} else {
 		mustbe( groups, "list" )
-		if( length(groups) == 1 && groups==""){
-			res <- sum( Smp$Biomass )
+		res <- if( length(groups) == 1 && groups==""){
+			sum( Smp$Biomass )
 		} else{
-			res <- sapply( groups, function(g) sum( Smp$Biomass[ Smp$Ident %in% g ] ) )
+			sapply( groups, function(g) sum( Smp$Biomass[ Smp$Ident %in% g ] ) )
 		}
 		names( res ) <- paste(header, names(groups))
 	}



More information about the Zooimage-commits mailing list