[Robast-commits] r105 - in branches/robast-0.6/pkg/RobAStBase: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 21 13:52:28 CEST 2008


Author: stamats
Date: 2008-07-21 13:52:28 +0200 (Mon, 21 Jul 2008)
New Revision: 105

Modified:
   branches/robast-0.6/pkg/RobAStBase/DESCRIPTION
   branches/robast-0.6/pkg/RobAStBase/R/AllGeneric.R
   branches/robast-0.6/pkg/RobAStBase/R/ContIC.R
   branches/robast-0.6/pkg/RobAStBase/R/Weights.R
   branches/robast-0.6/pkg/RobAStBase/R/infoPlot.R
   branches/robast-0.6/pkg/RobAStBase/man/ContIC-class.Rd
   branches/robast-0.6/pkg/RobAStBase/man/RobWeight-class.Rd
Log:
Tried to remove warning
* checking replacement functions ... WARNING
  weight<- \S4method{weight<-}{RobWeight}
In R, the argument of a replacement function which corresponds to the right
hand side must be named 'value'.

- with no success!!!
Why does this warning occur???

Modified: branches/robast-0.6/pkg/RobAStBase/DESCRIPTION
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/DESCRIPTION	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/DESCRIPTION	2008-07-21 11:52:28 UTC (rev 105)
@@ -1,12 +1,11 @@
 Package: RobAStBase
 Version: 0.1.0
-Date: 2008-02-26
+Date: 2008-06-03
 Title: Robust Asymptotic Statistics
 Description: Base S4-classes and functions for robust asymptotic statistics.
 Depends: R(>= 2.6.0), methods, distr(>= 2.0), distrEx(>= 2.0), distrMod(>= 2.0), RandVar(>= 0.6.2)
 Author: Matthias Kohl, Peter Ruckdeschel
 Maintainer: Matthias Kohl <Matthias.Kohl at stamats.de>
-SaveImage: no
 LazyLoad: yes
 License: GPL version 2 or later
 URL: http://www.stamats.de/RobASt.htm

Modified: branches/robast-0.6/pkg/RobAStBase/R/AllGeneric.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/AllGeneric.R	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/R/AllGeneric.R	2008-07-21 11:52:28 UTC (rev 105)
@@ -115,7 +115,7 @@
 }
 if(!isGeneric("weight<-")){
     setGeneric("weight<-",
-        function(object, value,  ...) standardGeneric("weight<-"))
+        function(object, value, ...) standardGeneric("weight<-"))
 }
 if(!isGeneric("clip")){
     setGeneric("clip",

Modified: branches/robast-0.6/pkg/RobAStBase/R/ContIC.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/ContIC.R	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/R/ContIC.R	2008-07-21 11:52:28 UTC (rev 105)
@@ -59,7 +59,7 @@
         normtype <-  res$normtype
         biastype <-  res$biastype
         if(is.null(res$w)) res$w <- new("HampelWeight")
-        w <- res$w        
+        w <- res$w
         return(ContIC(
                 name = "IC of contamination type", 
                 CallL2Fam = call("L2ParamFamily", 

Modified: branches/robast-0.6/pkg/RobAStBase/R/Weights.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/Weights.R	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/R/Weights.R	2008-07-21 11:52:28 UTC (rev 105)
@@ -1,29 +1,41 @@
-.eq <-function(x,y = 0*x, tol = 1e-7) abs(x-y)<tol
-
 setMethod("name", "RobWeight", function(object) object at name)
-setReplaceMethod("name", "RobWeight", function(object,value) 
-                  {object at name <- value; object})
+setReplaceMethod("name", "RobWeight", 
+    function(object, value){
+        object at name <- value
+        object
+    })
 
 
 setMethod("clip", "BoundedWeight", function(object) object at clip)
-setReplaceMethod("clip", "BoundedWeight", function(object,value) 
-                   {object at clip <- value; object})
+setReplaceMethod("clip", "BoundedWeight", 
+    function(object, value){
+        object at clip <- value
+        object
+    })
 
 
 setMethod("stand", "BdStWeight", function(object) object at stand)
-setReplaceMethod("stand", "BdStWeight", function(object,value) 
-                  {object at stand <- value; object})
+setReplaceMethod("stand", "BdStWeight", 
+    function(object, value){
+        object at stand <- value
+        object
+    })
 
 
 setMethod("cent", "HampelWeight", function(object) object at cent)
-setReplaceMethod("cent", "HampelWeight", function(object,value) 
-                   {object at cent <- value; object})
+setReplaceMethod("cent", "HampelWeight", 
+    function(object, value){
+        object at cent <- value
+        object
+    })
 
 setMethod("weight", "RobWeight", function(object) object at weight)
+setReplaceMethod("weight", "RobWeight", 
+    function(object, value){
+        object at weight <- value
+        object
+    })
 
-setReplaceMethod("weight", "RobWeight", function(object,value)
-        {object at weight <- value; object})
-
 setMethod("getweight",
           signature(Weight = "HampelWeight", neighbor = "ContNeighborhood",
                     biastype = "BiasType"),# normtype = "NormType"),

Modified: branches/robast-0.6/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/R/infoPlot.R	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/R/infoPlot.R	2008-07-21 11:52:28 UTC (rev 105)
@@ -22,7 +22,7 @@
 
             trafo <- L2Fam at param@trafo
             dims <- nrow(trafo)
-            
+
             QFc <- diag(dims)
             if(is(object,"ContIC") & dims>1 )
                {if (is(normtype(object),"QFNorm")) QFc <- QuadForm(normtype(object))
@@ -67,7 +67,7 @@
                 w0 <- options("warn")
                 options(warn = -1)
                 opar <- par()
-                get(getOption("device"))()
+                devNew()
                 par(mfrow = c(nrows, ncols))
                 IC1.i.5 <- QF.5%*%IC1
                 classIC.i.5 <- QFc.5%*%classIC

Modified: branches/robast-0.6/pkg/RobAStBase/man/ContIC-class.Rd
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/man/ContIC-class.Rd	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/man/ContIC-class.Rd	2008-07-21 11:52:28 UTC (rev 105)
@@ -59,8 +59,10 @@
 
     \item{\code{weight}:}{ object of class \code{"HampelWeight"}:
       weight function }
+
     \item{\code{biastype}:}{ object of class \code{"BiasType"}:
       bias type (symmetric/onsided/asymmetric) }
+
     \item{\code{normtype}:}{ object of class \code{"NormType"}:
       norm type (Euclidean, information/self-standardized)}
 

Modified: branches/robast-0.6/pkg/RobAStBase/man/RobWeight-class.Rd
===================================================================
--- branches/robast-0.6/pkg/RobAStBase/man/RobWeight-class.Rd	2008-06-06 12:34:12 UTC (rev 104)
+++ branches/robast-0.6/pkg/RobAStBase/man/RobWeight-class.Rd	2008-07-21 11:52:28 UTC (rev 105)
@@ -3,11 +3,11 @@
 \alias{RobWeight-class}
 \alias{name,RobWeight-method}
 \alias{name<-,RobWeight-method}
+\alias{weight}
 \alias{weight,RobWeight-method}
-\alias{weight}
+\alias{weight<-}
 \alias{weight<--methods}
 \alias{weight<-,RobWeight-method}
-\alias{weight<-}
 
 \title{Robust Weight classes}
 \description{Classes for robust weights.}
@@ -25,13 +25,13 @@
     \item{name}{\code{signature(object = "RobWeight")}: 
       accessor function for slot \code{name}. }
 
-    \item{name<-}{\code{signature(object = "RobWeight", value = "character")}: 
+    \item{name<-}{\code{signature(object = "RobWeight")}: 
       replacement function for slot \code{name}. }
 
     \item{weight}{\code{signature(object = "RobWeight")}: 
       accessor function for slot \code{weight}. }
 
-    \item{weight<-}{\code{signature(object = "RobWeight", value = "ANY")}: 
+    \item{weight<-}{\code{signature(object = "RobWeight")}: 
       replacement function for slot \code{weight}. }
   }
 }



More information about the Robast-commits mailing list