[Distr-commits] r79 - in pkg/distrEx: R chm man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 19 23:57:15 CET 2008


Author: ruckdeschel
Date: 2008-02-19 23:57:15 +0100 (Tue, 19 Feb 2008)
New Revision: 79

Modified:
   pkg/distrEx/R/vonMisesDist.R
   pkg/distrEx/chm/distrEx.chm
   pkg/distrEx/chm/vonMisesDist.html
   pkg/distrEx/man/vonMisesDist.Rd
Log:
option to force useApply = TRUE for vonMisesDist in distrEx...

try: 
require(distrMod)
x=rnorm(30)
NF=NormLocationScaleFamily()
system.time(print(MDEstimator(x,NF,vonMisesDist)))
system.time(print(MDEstimator(x,NF,vonMisesDist,useApply=TRUE)))


Modified: pkg/distrEx/R/vonMisesDist.R
===================================================================
--- pkg/distrEx/R/vonMisesDist.R	2008-02-19 22:31:32 UTC (rev 78)
+++ pkg/distrEx/R/vonMisesDist.R	2008-02-19 22:57:15 UTC (rev 79)
@@ -4,9 +4,9 @@
 ###############################################################################
 setMethod("vonMisesDist", signature(e1 = "UnivariateDistribution",
                                     e2 = "UnivariateDistribution"),
-    function(e1, e2, mu = e2, ... ){
+    function(e1, e2, mu = e2, useApply = FALSE, ... ){
         owarn <- getOption("warn"); options(warn = -1)
-        res <- E(mu, fun = function(t) {(p(e1)(t)-p(e2)(t))^2}, useApply = FALSE, ...)^.5
+        res <- E(mu, fun = function(t) {(p(e1)(t)-p(e2)(t))^2}, useApply = useApply, ...)^.5
         names(res) <- "vonMises distance"
         options(warn = owarn)
         return(res)

Modified: pkg/distrEx/chm/distrEx.chm
===================================================================
(Binary files differ)

Modified: pkg/distrEx/chm/vonMisesDist.html
===================================================================
--- pkg/distrEx/chm/vonMisesDist.html	2008-02-19 22:31:32 UTC (rev 78)
+++ pkg/distrEx/chm/vonMisesDist.html	2008-02-19 22:57:15 UTC (rev 79)
@@ -35,7 +35,7 @@
 vonMisesDist(e1, e2, ...)
 ## S4 method for signature 'UnivariateDistribution,
 ##   UnivariateDistribution':
-vonMisesDist(e1, e2, mu = e2, ...)
+vonMisesDist(e1, e2, mu = e2, useApply = FALSE, ...)
 ## S4 method for signature 'numeric,
 ##   UnivariateDistribution':
 vonMisesDist(e1, e2, mu = e2, ...)
@@ -54,6 +54,9 @@
 <tr valign="top"><td><code>...</code></td>
 <td>
 further arguments to be used e.g. by <code>E()</code></td></tr>
+<tr valign="top"><td><code>useApply</code></td>
+<td>
+logical; to be passed to <code><a href="E.html">E</a>()</code></td></tr>
 <tr valign="top"><td><code>mu</code></td>
 <td>
 object of class <code>"Distribution"</code>; integration measure; defaulting to <code>e2</code> </td></tr>

Modified: pkg/distrEx/man/vonMisesDist.Rd
===================================================================
--- pkg/distrEx/man/vonMisesDist.Rd	2008-02-19 22:31:32 UTC (rev 78)
+++ pkg/distrEx/man/vonMisesDist.Rd	2008-02-19 22:57:15 UTC (rev 79)
@@ -17,13 +17,14 @@
 }
 \usage{
 vonMisesDist(e1, e2, ...)
-\S4method{vonMisesDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e2, ...)
+\S4method{vonMisesDist}{UnivariateDistribution,UnivariateDistribution}(e1, e2, mu = e2, useApply = FALSE, ...)
 \S4method{vonMisesDist}{numeric,UnivariateDistribution}(e1, e2, mu = e2, ...)
 }
 \arguments{
   \item{e1}{ object of class \code{"Distribution"} or class \code{"numeric"} }
   \item{e2}{ object of class \code{"Distribution"} }
   \item{\dots}{ further arguments to be used e.g. by \code{E()}}
+  \item{useApply}{ logical; to be passed to \code{\link{E}()}}
   \item{mu}{ object of class \code{"Distribution"}; integration measure; defaulting to \code{e2} }
 }
 %\details{}



More information about the Distr-commits mailing list