mikek@cires.colorado.edu
2005-Oct-31 21:34 UTC
[Rd] Minor typos with UseMethod docs (PR#8269)
Full_Name: Mike Kay Version: R-patched OS: Linux Submission from: (NULL) (137.75.70.37) Hi, The following patch cleans up some grammar in the docs for UseMethod (library/base/help/UseMethod) -mike --- UseMethod 2005-09-28 20:06:39.000000000 +0000 +++ /tmp/UseMethod 2005-10-31 21:21:05.534708720 +0000 @@ -5,7 +5,7 @@ Description: R possesses a simple generic function mechanism which can be used - for an object-oriented style of programming. Method despatch + for an object-oriented style of programming. Method dispatch takes place based on the class of the first argument to the generic function or on the object supplied as an argument to 'UseMethod' or 'NextMethod'. @@ -34,12 +34,12 @@ have a class attribute, it has an implicit class. Matrices and arrays have class '"matrix"' or'"array"' followed by the class of the underlying vector. Most vectors have class the result of - 'mode(x)', expect that integer vectors have class 'c("integer", + 'mode(x)', except that integer vectors have class 'c("integer", "numeric")' and real vectors have class 'c("double", "numeric")'. When a generic function 'fun' is applied to an object with class attribute 'c("first", "second")', the system searches for a - function called 'fun.first' and, if it finds it, applied it to the + function called 'fun.first' and, if it finds it, applies it to the object. If no such function is found a function called 'fun.second' is tried. If no class name produces a suitable function, the function 'fun.default' is used, if it exists, or an
Maybe Matching Threads
- Typos in 'R Language Definition' 2.0.1 Draft 2004-11-15 (PR#7412)
- S3 method despatch (changed between 2.6.2 and 2.7.0 RC?)
- graphics::Axis loosing S3/S4 class attributes of 'x' in 2.7.0 RC
- UseMethod change; isas-tests; all.equal
- Best/safest way to use UseMethod()?