[inlinedocs] Examples and S4 classes/methods

Thiago Guerrera thigm85 at gmail.com
Sun Jun 26 14:27:45 CEST 2011


Btw, I think this is lazy way to use the S4 classes in my personal package
without having to use the 'NAMESPACE' file, but now I have an incentive to
define the S4 classes properly using the export mechanisms detailed in
Section 1.6.6 of "Writing R Extensions".

Best,

Thiago

On Sun, Jun 26, 2011 at 12:48 PM, Thiago Guerrera <thigm85 at gmail.com> wrote:

> That's because each function contain classes related to each other, like a
> grouping to make things more organized, then I would have a .First.lib that
> look like this:
>
> .First.lib <- function(libname, pkgname, where) {
>
>  if( !require(methods) ) stop()
>  where <- match(paste("package:", pkgname, sep=""), search())
>
>  .initGENERICS(where)
>  .initCLASSES_GROUP1(where)
>  .initCLASSES_GROUP2(where)
>  .initCLASSES_METHOD_FOR_GROUP1(where)
>
> }
>
> I am not sure if this is ideal, but makes things clear for me. Any
> suggestion for the organization of S4 classes?
>
> Best,
>
> Thiago
>
>
> On Sun, Jun 26, 2011 at 12:04 PM, Toby Dylan Hocking <
> Toby.Hocking at inria.fr> wrote:
>
>> You are correct: inlinedocs can currently only generate documentation
>> for S4 classes defined in the usual way, as indicated in the
>> examples.
>>
>> Out of curiousity, why do you define S4 classes inside of functions?
>>
>
>
>
> --
> Thiago Guerrera Martins
>
>


-- 
Thiago Guerrera Martins
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/inlinedocs-support/attachments/20110626/7470a24d/attachment.htm>


More information about the Inlinedocs-support mailing list