From ripley@stats.ox.ac.uk  Sat Feb  1 21:28:03 2003
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Sat Feb  1 21:28:03 2003
Subject: [Rd] removeMethods (methods) does not work in my examples (PR#2519)
Message-ID: <200302012028.VAA05398@pubhealth.ku.dk>

R 1.6.2 (also R-devel 2003-02-01)

An example from S Programming:

library(methods)
setClass("xyloc", representation(x="numeric", y="numeric"))
setClass("fungi", representation("xyloc", species="character"))

show.fungi <- function(object) {
  tmp <- rbind(x = format(round(object@x, 2)),
               y = format(round(object@y, 2)),
               species = object@species)
  dimnames(tmp)[[2]] <- rep("", length(object@x))
  print(tmp, quote=F)
  invisible(object)
}
setMethod("show", "fungi", show.fungi)  ## works

removeMethod("show", "fungi") ## works in S4 but R gives
Error in identical(args[1], "...") : Object "fnames" not found

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] removeMethods (methods) does not work in my examples (PR#2519)
ripley@stats.ox.ac.uk