[inlinedocs] Examples and S4 classes/methods

Toby Dylan Hocking Toby.Hocking at inria.fr
Thu Jun 23 21:54:49 CEST 2011


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.


More information about the Inlinedocs-support mailing list