The R Project SVN R

Rev

Rev 49567 | Rev 51271 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 49567 Rev 51265
Line 1... Line 1...
1
% File src/library/base/man/UseMethod.Rd
1
% File src/library/base/man/UseMethod.Rd
2
% Part of the R package, http://www.R-project.org
2
% Part of the R package, http://www.R-project.org
3
% Copyright 1995-2007 R Core Development Team
3
% Copyright 1995-2010 R Core Development Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{UseMethod}
6
\name{UseMethod}
7
\title{Class Methods}
7
\title{Class Methods}
8
\alias{UseMethod}
8
\alias{UseMethod}
Line 51... Line 51...
51
  exists, or an error results.
51
  exists, or an error results.
52
 
52
 
53
  Function \code{\link{methods}} can be used to find out about the
53
  Function \code{\link{methods}} can be used to find out about the
54
  methods for a particular generic function or class.
54
  methods for a particular generic function or class.
55
 
55
 
56
  \code{UseMethod} is a primitive function so positional matching is
56
  \code{UseMethod} is a primitive function but (as from \R 2.11.0) uses
57
  used and names of supplied arguments are ignored.  It is not the only
57
  standard argument matching.  It is not the only means of dispatch of
58
  means of dispatch of methods, for there are \link{internal generic}
58
  methods, for there are \link{internal generic} and \link{group
59
  and \link{group generic} functions.  \code{UseMethod} currently
59
  generic} functions.  \code{UseMethod} currently dispatches on the
60
  dispatches on the implicit class even for arguments that are not
60
  implicit class even for arguments that are not objects, but the other
61
  objects, but the other means of dispatch do not.
61
  means of dispatch do not.
62
 
62
 
63
  \code{NextMethod} invokes the next method (determined by the
63
  \code{NextMethod} invokes the next method (determined by the
64
  class vector, either of the object supplied to the generic, or of
64
  class vector, either of the object supplied to the generic, or of
65
  the first argument to the function containing \code{NextMethod} if a
65
  the first argument to the function containing \code{NextMethod} if a
66
  method was invoked directly).  Normally \code{NextMethod} is used with
66
  method was invoked directly).  Normally \code{NextMethod} is used with