[inlinedocs] Examples and S4 classes/methods

Thiago Guerrera thigm85 at gmail.com
Sat Jun 25 15:07:23 CEST 2011


About the S4 class documentation, I did exact as in the example inlinedocs
gave but still does not work. But I think it might be because my class
definition lies inside a function, right?

For ex.

.initFoo <- function(where) {
 setClass("foo",
 ###foo class
 representation(a="character",
                       ### argument a
                       b="numeric"),
                       ### argument b
 where=where)
}

Best,

Thiago

On Thu, Jun 23, 2011 at 9:54 PM, Toby Dylan Hocking
<Toby.Hocking at inria.fr>wrote:

> Hi Thiago, thanks for your interest in inlinedocs.
>
> The recommended way to document examples using inlinedocs is the "ex"
> attribute, as in the second screenshot on this web page.
> http://inlinedocs.r-forge.r-project.org/ i.e.
>
> myfun <- structure(function(
>  arg1 ##<< doc1
> ){
>  body of function
> },ex=function(){
>  example code
> })
>
> For documenting S4 classes using inlinedocs, see
> example(package.skeleton.dx). In the silly example package, we do
> setClass("Silly",...) and this results in Silly-class.Rd, which can be
> looked up using alias Silly or Silly-class after the silly package is
> loaded. help("Silly") or help("Silly-class") should work.
>
> Currently it is not possible to document S4 methods using inlinedocs,
> but if you write some code that supports this we would definitely
> consider it for inclusion in inlinedocs.
>



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


More information about the Inlinedocs-support mailing list