[R] An opinion question, please

Rui Barradas ru|pb@rr@d@@ @end|ng |rom @@po@pt
Tue Apr 8 09:26:23 CEST 2025


Às 18:35 de 07/04/2025, Erin Hodgess escreveu:
> Hello everyone!
> 
> I have an opinion question please.  If I’m writing a new package, would you
> recommend using S3 or S4 structure, please?
> 
> I know I will get lots of opinions, but that’s fine.
> 
> Thanks,
> Erin
> 
> 
> Erin Hodgess, PhD
> mailto: erinm.hodgess using gmail.com
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Hello,

I prefer S3's simplicity. It's easy to program and there are lots of 
packages using it, including, for time series, base class ts and its 
functions, zoo, xts, etc.

If you want a good introduction to creating a package using S4, read 
package Brobdingnag [1] vignette.


vignette("S4_brob", package = "Brobdingnag")


[1] https://CRAN.R-project.org/package=Brobdingnag

Hope this helps,

Rui Barradas


-- 
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença de vírus.
www.avg.com



More information about the R-help mailing list