[Distr-commits] r872 - branches/distr-2.5/pkg/distr/R branches/distr-2.5/pkg/distr/man pkg/distr/R pkg/distr/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 28 03:30:33 CET 2013
Author: ruckdeschel
Date: 2013-01-28 03:30:31 +0100 (Mon, 28 Jan 2013)
New Revision: 872
Modified:
branches/distr-2.5/pkg/distr/R/0distrOptions.R
branches/distr-2.5/pkg/distr/R/internalUtils.R
branches/distr-2.5/pkg/distr/man/distroptions.Rd
pkg/distr/R/0distrOptions.R
pkg/distr/R/internalUtils.R
pkg/distr/man/distroptions.Rd
Log:
distr: introduced new option warn.makeDNew to suppress annoying warnings when dealing with GEVD
Modified: branches/distr-2.5/pkg/distr/R/0distrOptions.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/0distrOptions.R 2013-01-27 17:39:15 UTC (rev 871)
+++ branches/distr-2.5/pkg/distr/R/0distrOptions.R 2013-01-28 02:30:31 UTC (rev 872)
@@ -16,7 +16,9 @@
withSweave = FALSE,
## new Items after mail by Jacob van Etter, 27-02-09
DistrCollapse.Unique.Warn = FALSE,
- use.generalized.inverse.by.default = TRUE
+ use.generalized.inverse.by.default = TRUE,
+ ## new Item after annoying warnings with GEV 28-01-13
+ warn.makeDNew = TRUE
)
distroptions <- function(...) {
if (nargs() == 0) return(.distroptions)
Modified: branches/distr-2.5/pkg/distr/R/internalUtils.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/internalUtils.R 2013-01-27 17:39:15 UTC (rev 871)
+++ branches/distr-2.5/pkg/distr/R/internalUtils.R 2013-01-28 02:30:31 UTC (rev 872)
@@ -784,7 +784,8 @@
else {
stand <- try(integrate(df1, -Inf, Inf)$value, TRUE)
if (is(stand,"try-error")){
- warning("'integrate()' threw an error ---result may be inaccurate.")
+ if(getdistrOption("warn.makeDNew"))
+ warning("'integrate()' threw an error ---result may be inaccurate.")
stand <- sum(df1(x))*h*(x[2]-x[1])
}
}
Modified: branches/distr-2.5/pkg/distr/man/distroptions.Rd
===================================================================
--- branches/distr-2.5/pkg/distr/man/distroptions.Rd 2013-01-27 17:39:15 UTC (rev 871)
+++ branches/distr-2.5/pkg/distr/man/distroptions.Rd 2013-01-28 02:30:31 UTC (rev 872)
@@ -12,6 +12,7 @@
\alias{WarningArith}
\alias{WarningSim}
\alias{withSweave}
+\alias{warn.makeDNew}
%\alias{simplifyD}
\alias{withgaps}
\alias{use.generalized.inverse.by.default}
@@ -86,6 +87,9 @@
whenever collapsing occurs or when two points are collapsed by a call to
\code{unique()} (default behaviour if \code{DistrCollapse} is \code{FALSE});
---default \code{FALSE}}
+\item{\code{warn.makeDNew}}{controls whether a warning is issued once in
+ internal utility \code{.makeDNew} standard integration with
+ \code{integrate} throws an error---default \code{TRUE}}
}
}
\examples{
Modified: pkg/distr/R/0distrOptions.R
===================================================================
--- pkg/distr/R/0distrOptions.R 2013-01-27 17:39:15 UTC (rev 871)
+++ pkg/distr/R/0distrOptions.R 2013-01-28 02:30:31 UTC (rev 872)
@@ -16,7 +16,9 @@
withSweave = FALSE,
## new Items after mail by Jacob van Etter, 27-02-09
DistrCollapse.Unique.Warn = FALSE,
- use.generalized.inverse.by.default = TRUE
+ use.generalized.inverse.by.default = TRUE,
+ ## new Item after annoying warnings with GEV 28-01-13
+ warn.makeDNew = TRUE
)
distroptions <- function(...) {
if (nargs() == 0) return(.distroptions)
Modified: pkg/distr/R/internalUtils.R
===================================================================
--- pkg/distr/R/internalUtils.R 2013-01-27 17:39:15 UTC (rev 871)
+++ pkg/distr/R/internalUtils.R 2013-01-28 02:30:31 UTC (rev 872)
@@ -784,7 +784,8 @@
else {
stand <- try(integrate(df1, -Inf, Inf)$value, TRUE)
if (is(stand,"try-error")){
- warning("'integrate()' threw an error ---result may be inaccurate.")
+ if(getdistrOption("warn.makeDNew"))
+ warning("'integrate()' threw an error ---result may be inaccurate.")
stand <- sum(df1(x))*h*(x[2]-x[1])
}
}
Modified: pkg/distr/man/distroptions.Rd
===================================================================
--- pkg/distr/man/distroptions.Rd 2013-01-27 17:39:15 UTC (rev 871)
+++ pkg/distr/man/distroptions.Rd 2013-01-28 02:30:31 UTC (rev 872)
@@ -12,6 +12,7 @@
\alias{WarningArith}
\alias{WarningSim}
\alias{withSweave}
+\alias{warn.makeDNew}
%\alias{simplifyD}
\alias{withgaps}
\alias{use.generalized.inverse.by.default}
@@ -86,6 +87,9 @@
whenever collapsing occurs or when two points are collapsed by a call to
\code{unique()} (default behaviour if \code{DistrCollapse} is \code{FALSE});
---default \code{FALSE}}
+\item{\code{warn.makeDNew}}{controls whether a warning is issued once in
+ internal utility \code{.makeDNew} standard integration with
+ \code{integrate} throws an error---default \code{TRUE}}
}
}
\examples{
More information about the Distr-commits
mailing list