[R-SIG-Finance] Setting a new method for generic function correctly?

Brian G. Peterson brian at braverock.com
Sat Sep 21 21:23:05 CEST 2013


On 09/21/2013 01:53 PM, Mikhail Beketov wrote:
> Can somebody explain me how to correctly set a new class-specific method
> for generic functions (e.g. for "plot", "summary" and "print"). I simply
> programmed these functions with the class names and it works perfectly.
<...>
> However, I need the new methods for a new package, and the "R CMD check"
> gives me warnings that my approach is not correct. I have to define methods
> and do not use full names as "print.newclass".
> I read the "Writing R Extensions" and it is not explained there (at least
> to such level that I can get it) and didn't get anything understandable by
> googling.

What part of

http://cran.r-project.org/doc/manuals/R-exts.html#Registering-S3-methods

doesn't make sense?

You need to register your S3 methods in the package NAMESPACE.

...and this question really belonged on R-help, as it has nothing to do 
with finance.


-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list