From r.hankin at noc.soton.ac.uk  Thu Sep  1 15:57:01 2005
From: r.hankin at noc.soton.ac.uk (Robin Hankin)
Date: Thu, 1 Sep 2005 14:57:01 +0100
Subject: [Rd] generic function S3 consistency warning advice
Message-ID: <3128D6C1-B044-4CBF-8D7C-21A0B52D9904@soc.soton.ac.uk>

Hi

section 6.1 of R-exts suggests that a package  can take over a  
function in the base
package and make it generic.

I want to do this with Re() and have the following lines in my R code:



"Re" <- function(x){UseMethod("Re" )}
"Re.default" <- get("Re" ,pos=NULL,mode="function")
"Re.octonion" <- function(x){give.comp(x,1)}

This, however, generates the following warning from R CMD check:

* checking S3 generic/method consistency ... WARNING
Re:
   function(x)
Re.default:
   function()

See section 'Generic functions and methods' of the 'Writing R  
Extensions'
manual.



I can suppress the warning by commenting out the first line.  Is this a
sensible thing to do?




--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743



[Rd] generic function S3 consistency warning advice
Robin Hankin