[R] S4 classes in existing packages

Robin Hankin r.hankin at noc.soton.ac.uk
Mon Feb 20 13:16:44 CET 2006


Hi

Last year, there was a thread discussing S4 classes in existing  
packages.

I'm thinking of converting one of my packages from S3 to S4
and am having difficulty getting started.

I have "Programming with data" right here, and "S4 classes in 15  
pages, more
or less". I have also been looking at  the packages that are listed  
below...

...but what I really really want is a "hello, world!" package that
implements the track example in the Green Book and
illustrates best practice for S4 methods.

Has anyone coded up such a thing?





On 1 Nov 2005, at 08:33, Pfaff, Bernhard Dr. wrote:

>> Jeff Enos schrieb:
>>
>>> R-devel,
>>>
>>> I'm interested in looking at some examples of existing R packages  
>>> that
>>> rely heavily on S4 classes to get a feel for varying styles and
>>> package organization techniques.  Could you recommend any packages
>>> that might serve as a good starting point?
>>>
>>> Thanks in advance,
>>>
>>> Jeff
>>>
>>>
>> our packages distr, distrEx, distrSim, distrTEst and RandVar are  
>> based
>> on S4 classes and methods.
>
> As do many others, providing the variety of styles that the questioner
> asked for.  Those that are documented to do so include
>
> CoCo DBI IDPmisc Matrix RMySQL ROracle RSQLite RUnit SparseM aod  
> arules
> boolean coin colorspace copula deal dynamicGraph fBasics(etc)  
> flexclust
> flexmix giRaph gpclib its kappalab kernalb limma lme4 matlab monoProc
> orientlib partsm pixmap tuneR
>
> on CRAM, stats4 in the R sources and most (all?) of BioC.
>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>
>
> Hello Jeff,
>
> to amend the list: in the package "urca" S4-classes are implemented  
> too.
>
> Best,
> Bernhard
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r- 
> devel*****************************************************************
> Confidentiality Note: The information contained in this message,
> and any attachments, may contain confidential and/or privileged
> material. It is intended solely for the person(s) or entity to
> which it is addressed. Any review, retransmission, dissemination,
> or taking of any action in reliance upon this information by
> persons or entities other than the intended recipient(s) is
> prohibited. If you received this in error, please contact the
> sender and delete the material from any computer.
> *****************************************************************
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743




More information about the R-help mailing list