[Seqinr-commits] r1949 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 17 21:41:39 CEST 2016


Author: jeanlobry
Date: 2016-06-17 21:41:39 +0200 (Fri, 17 Jun 2016)
New Revision: 1949

Modified:
   pkg/R/PI.R
Log:
adding a suppressWarning to fix Haruo Susuki request

Modified: pkg/R/PI.R
===================================================================
--- pkg/R/PI.R	2016-06-17 19:20:21 UTC (rev 1948)
+++ pkg/R/PI.R	2016-06-17 19:41:39 UTC (rev 1949)
@@ -33,13 +33,13 @@
     computeCharge(pH = p1, compoAA = p2, pK = p3, nTermResidue = p4, cTermResidue = p5)^2
   }
 
-  nlmres <- nlm(critere, 7, p2 = compoAA, p3 = SEQINR.UTIL$pk, p4 = nTermR, p5 = cTermR)
+  nlmres <- suppressWarnings(nlm(critere, 7, p2 = compoAA, p3 = SEQINR.UTIL$pk, p4 = nTermR, p5 = cTermR))
   #
   # If minimum is not zero, try whith a different guess:
   #
   while( ! identical(all.equal( nlmres$minimum, 0 ), TRUE))
   {
-    nlmres <- nlm(critere, runif(1, 0, 14), p2 = compoAA, p3 = SEQINR.UTIL$pk, p4 = nTermR, p5 = cTermR)
+    nlmres <- suppressWarnings(nlm(critere, runif(1, 0, 14), p2 = compoAA, p3 = SEQINR.UTIL$pk, p4 = nTermR, p5 = cTermR))
   }
   return(nlmres$estimate)
 }



More information about the Seqinr-commits mailing list