Janko Thyson
2012-Jun-18 08:01 UTC
[Rd] S4 Reference Classes: declaring public and private methods
Dear list, is there a way to declare public and private methods in S4 Reference Classes? If not, are there plans to add such a feature? You'll find a small code example of what I mean at Stackoverflow: http://stackoverflow.com/questions/11073253/oop-with-r-is-there-a-way-to-declare-public-and-private-methods-s4-reference-c Thanks a lot, Janko Thyson
Martin Morgan
2012-Jun-21 03:24 UTC
[Rd] S4 Reference Classes: declaring public and private methods
On 06/18/2012 01:01 AM, Janko Thyson wrote:> Dear list, > > is there a way to declare public and private methods in S4 Reference > Classes? If not, are there plans to add such a feature?Hi Janko -- your question is a little ambiguous; if it's about a built-in facility to create public vs. private methods, I think the answer is no, there is no built-in facility. For the more general question of how one might go about enforcing private methods, I can think of several convoluted starts, but these seem like terrible hacks and I wouldn't want to commit them to paper; perhaps someone else will be more bold. Martin> > You'll find a small code example of what I mean at Stackoverflow: > http://stackoverflow.com/questions/11073253/oop-with-r-is-there-a-way-to-declare-public-and-private-methods-s4-reference-c > > > Thanks a lot, > Janko Thyson > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
Reasonably Related Threads
- Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
- Feature request: mixing `...` (three dots) with other formal arguments in S4 methods
- WG: Reference classes: error with missing arguments in method calls
- S4 Reference Classes: undesired behavior when calling method '$field()'
- Function "nsl()" missing in package utils