[Robast-commits] r203 - pkg/RandVar/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Nov 3 07:32:15 CET 2008


Author: stamats
Date: 2008-11-03 07:32:15 +0100 (Mon, 03 Nov 2008)
New Revision: 203

Modified:
   pkg/RandVar/R/util.R
Log:
just formating ....

Modified: pkg/RandVar/R/util.R
===================================================================
--- pkg/RandVar/R/util.R	2008-11-03 06:31:42 UTC (rev 202)
+++ pkg/RandVar/R/util.R	2008-11-03 06:32:15 UTC (rev 203)
@@ -1,9 +1,12 @@
 ## small util if imageDistr fails
-.getImageDistr <- function(f, distr)
-{ if (is(distr, "DiscreteDistribution"))
-      return(DiscreteDistribution(prob=d(distr)(support(distr)), supp=f(support(distr))))
-  if (is(try(return(f(distr)), silent = TRUE),
-         "try-error")){
-  rl <- function(n) { xr <- r(distr)(n); f(xr) }
-  return(AbscontDistribution( r = rl, .withArith = TRUE, .withSim = TRUE))}
-}         
\ No newline at end of file
+.getImageDistr <- function(f, distr){ 
+    if (is(distr, "DiscreteDistribution"))
+        return(DiscreteDistribution(prob=d(distr)(support(distr)), supp=f(support(distr))))
+    if(is(try(return(f(distr)), silent = TRUE), "try-error")){
+        rl <- function(n){ 
+            xr <- r(distr)(n) 
+            f(xr) 
+        }
+        return(AbscontDistribution(r = rl, .withArith = TRUE, .withSim = TRUE))
+    }
+}
\ No newline at end of file



More information about the Robast-commits mailing list