[adegenet-commits] r427 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Aug 28 12:28:42 CEST 2009


Author: jombart
Date: 2009-08-28 12:28:33 +0200 (Fri, 28 Aug 2009)
New Revision: 427

Modified:
   pkg/R/seqTrack.R
Log:
Non-integer weights now issue an error in get.likelihood, when a number of mutation is expected. 


Modified: pkg/R/seqTrack.R
===================================================================
--- pkg/R/seqTrack.R	2009-08-28 10:00:36 UTC (rev 426)
+++ pkg/R/seqTrack.R	2009-08-28 10:28:33 UTC (rev 427)
@@ -898,8 +898,8 @@
 get.likelihood.seqTrack <-function(x, method=("genetic"), mu0=NULL, seq.length=NULL,...){
     method <- match.arg(method)
     if(method=="genetic"){ # p(nb mutations occur in the time interval)
-        if(any(na.omit(res$weight - round(res$weight) > 1e-10))){
-            warning("Non-integer weights: number of mutations expected in x$weight.")
+        if(any(na.omit(res$weight - round(res$weight)) > 1e-10)){
+            stop("Non-integer weights: number of mutations expected in x$weight.")
         }
 
         if(is.null(mu0)) stop("mu0 is required.")



More information about the adegenet-commits mailing list