[R] learning S4

Robin Hankin r.hankin at noc.soton.ac.uk
Mon Feb 11 09:12:28 CET 2008


Christophe

you might find the Brobdingnag package on CRAN helpful here.

I wrote the package partly to teach myself S4; it includes a
  vignette that builds the various S4 components from scratch,
in a step-by-step annotated "cookbook".


HTH


rksh




On 8 Feb 2008, at 15:30, cgenolin at u-paris10.fr wrote:

> Hi the list.
>
> I try to learn the S4 programming. I find the wiki and several doc.  
> But
> I still have few questions...
>
> 1. To define 'representation', we can use two syntax :
>    - representation=list(temps = 'numeric',traj = 'matrix')
>    - representation(temps = 'numeric',traj = 'matrix')
>   Is there any difference ?
> 2. 'validityMethod' check the intialisation of a new object, but not
> the latter
>   modifications. Is it possible to set up a validation that check  
> every
>   modifications ?
> 3. When we use setMethod('initialize',...) does the validityMethod
> become un-used ?
> 4. Is it possible to set up several initialization processes ?   One
> that build an objet from a data.frame, one from a matrix...
>
> Thanks
>
> Christophe
>
> ----------------------------------------------------------------
> Ce message a ete envoye par IMP, grace a l'Universite Paris 10  
> Nanterre
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

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



More information about the R-help mailing list