[R-pkg-devel] create methods in package

Glenn Schultz glennmschultz at me.com
Sun Jul 31 21:01:14 CEST 2016


All,

I have set-up both getters and setters for my package and everything works great (just like BioConductor).  Now, I would like to create new methods that create graphs of cashflows and distributions of OAS simulations. My question is this.  Should the method call the constructor function and then plot or is it better to call the method against an object that has been create and resides in the local environment?

Example 1:

foo <- constructor(foo)
method(foo)

Example 2:

method(foo,..){
constructor
plot(constructor)}

Thanks in Advance,
Glenn


More information about the R-package-devel mailing list