Skip to content

Undocumented S4 methods: generic 'show'

3 messages · Brian Ripley, Pfaff, Bernhard Dr.

#
Dear R-Devel subsriber,

during the set-up of a package with a NAMESPACE I stumbled over the
following warning during:

R CMD check -l c:/R/package smem

## skipped output
* checking for missing documentation entries ... WARNING
Undocumented S4 methods:
  generic 'show' and siglist 'equation'
All user-level objects in a package (including S4 classes and methods)
## skipped output

However, I do have in the Rd.-file for class 'equation' an \alias{} as:

\alias{show, equation-method}

and I have included in the same file:

\section{Methods}{
  \describe{
    \item{show}{\code{signature(object = "equation")}: Prints the
      formula and the type of an equation.}
    }
}

The show-method for objects of class 'equation' is defined as:

setMethod("show", signature(object = "equation"), function(object){
  cat("\nFormula:\n")
  print(object at formula)
  cat(paste("Type of equation:", object at type, "\n"))
}
)

In the NAMESPACE, I have included:

exportMethods("show")


Any pointers are most welcome.

Best,
Bernhard
_

platform       i386-pc-mingw32

arch           i386

os             mingw32

system         i386, mingw32

status         Under development (unstable)

major          2

minor          5.0

year           2006

month          10

day            10

svn rev        39600

language       R

version.string R version 2.5.0 Under development (unstable) (2006-10-10
r39600)
Dr. Bernhard Pfaff
Global Structured Products Group
(Europe)

Invesco Asset Management Deutschland GmbH
Bleichstrasse 60-62
D-60313 Frankfurt am Main

Tel: +49(0)69 29807 230
Fax: +49(0)69 29807 178
Email: bernhard_pfaff at fra.invesco.com 
*****************************************************************
Confidentiality Note: The information contained in this mess...{{dropped}}
#
On Wed, 22 Nov 2006, Pfaff, Bernhard Dr. wrote:

            
There are no spaces in the examples in Writing R Extensions, so I would 
not have assumed they are allowed.  Does it work without the space?  (If 
it supposed to, we need to document that.)
#
Dear Prof. Ripley, Dear Kurt,

many thanks for your swift replies. Yes, after dropping the space in the
\alias{} everything works fine.
Apologies for not having read the documentation carefully enough and
indeed in section 2.1.3 it is stated:

"generic,signature_list-method"

furthermore, in the following paragraph it is clearly written:

"...where signature list contains the names of the classes in the
signature of the method (without
quotes) separated by ',' (without whitespace),..."

Hence, the fine manual is pretty explicit about whitespaces (which I
have not compared carefully enough with my ill-footed \alias{}
directive).

Best,
Bernhard
*****************************************************************
Confidentiality Note: The information contained in this mess...{{dropped}}