[R] names.data.frame?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Nov 4 10:56:29 CET 2021

On 03/11/2021 3:42 p.m., Duncan Murdoch wrote:
> On 03/11/2021 2:54 p.m., Andrew Simmons wrote:
  ... deletions ...
>> As a side note, I would suggest making your class through the methods
>> package, with methods::setClass("pm", ...)
>> See the documentation for setClass for more details, it's the recommended
>> way to define classes in R.
> That's incorrect.  It is *a* recommended way to define classes in R, but
> there are other recommended ways as well, for doing other kinds of
> things, and many people stick with the S3 system without formal classes
> at all.

In fact, Andrew was paraphrasing some documentation, so his statement 
isn't incorrect.

Duncan Murdoch

> If you're writing a Bioconductor package you should probably use the
> formal methods.  If you're writing code for other purposes, you should
> think about whether you need formal classes at all, and if so, whether
> the methods package formalism is a match for what you're doing.
> Duncan Murdoch

More information about the R-help mailing list