Skip to content
Prev 21136 / 63424 Next

Function hints

I agree - having some kind of include command would mitigate this
problem, but I think many documentation systems have struggled with
this (hard) problem and I'm not aware of any great solutions.
One model to follow might be xinclude
(http://www.w3.org/TR/xinclude/), although I don't really know much
about it apart from a dim awareness of its existance, and being an xml
schema it is probably over complicated.
I've attached an example of my own inline documentation system,
modelled closely on javadoc, which I use for documenting my packages.
It took me a few hours to whip up a (ruby) program to turn this into
rdoc files, and wouldn't require too much more time to make more
robust (and rewrite in R for wider distribution).

Having a lot of documentation in your source files does feel strange
at first, but I think you quickly get used to it, and functions with
more code than documentation soon start to look strange.
I agree - apart from hiring a dedicated keyword person I can't see
anyway that this is going to improve significantly.
Ok, I can fix my function fairly easily, what should I list - the name
of the function, or what to call to get help?  (or maybe if people
were more aware of the "?simulate(x)" form, it wouldn't be such a
problem.
That's it - I'll give that a go.
Yes, which is why I don't do it automatically - it would be nice to
recommend using sentence case in the R developers guide.

Hadley