[Robast-commits] r473 - branches/robast-0.9/pkg/RobExtremes/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 21 02:59:38 CEST 2012


Author: ruckdeschel
Date: 2012-05-21 02:59:38 +0200 (Mon, 21 May 2012)
New Revision: 473

Modified:
   branches/robast-0.9/pkg/RobExtremes/R/SnQn.R
   branches/robast-0.9/pkg/RobExtremes/R/interpolSn.R
Log:
RobExtremes: moved definition of S4 method for Sn and GPareto from interpolSn.R to SnQn.R

Modified: branches/robast-0.9/pkg/RobExtremes/R/SnQn.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/SnQn.R	2012-05-21 00:54:33 UTC (rev 472)
+++ branches/robast-0.9/pkg/RobExtremes/R/SnQn.R	2012-05-21 00:59:38 UTC (rev 473)
@@ -103,3 +103,16 @@
     function(x, ...){
            return(abs(x at a) * Qn(x at X0,...))
     })
+
+ setMethod("Sn", signature(x = "GPareto"),
+    function(x, ...){
+           if(abs(scale(x)-1)< 1e-12){
+#              sng <- .SnGrids
+              sng <- getFromNamespace(".SnGrids", ns = "RobExtremes")
+              snf <- sng[["Generalized Pareto Family"]][["fct"]]
+              ret <- snf(shape(x))
+           }else ret <- scale(x)*Sn(x=x/scale(x))
+           return(ret)
+    })
+
+

Modified: branches/robast-0.9/pkg/RobExtremes/R/interpolSn.R
===================================================================
--- branches/robast-0.9/pkg/RobExtremes/R/interpolSn.R	2012-05-21 00:54:33 UTC (rev 472)
+++ branches/robast-0.9/pkg/RobExtremes/R/interpolSn.R	2012-05-21 00:59:38 UTC (rev 473)
@@ -173,15 +173,3 @@
   return(invisible(NULL))
 }
 
-setMethod("Sn", signature(x = "GPareto"),
-    function(x, ...){
-           if(abs(scale(x)-1)< 1e-12){
-#              sng <- .SnGrids
-              sng <- getFromNamespace(".SnGrids", ns = "RobExtremes")
-              snf <- sng[["Generalized Pareto Family"]][["fct"]]
-              ret <- snf(shape(x))
-           }else ret <- scale(x)*Sn(x=x/scale(x))
-           return(ret)
-    })
-
-



More information about the Robast-commits mailing list