+1 for roxygen2, lazycoolness oblige. An alternative that has not been mentioned is inlinedocs, http://inlinedocs.r-forge.r-project.org/ I don't use it myself, but it might appeal to your workflow.
baptiste On 10 September 2011 06:41, Hadley Wickham <[email protected]> wrote: >> | In other languages, I've seen to write the documentation inside the >> | code files and then post-process to make the documentation. Is there >> | a similar thing for R, to unify the R code development and >> | documentation/package-making process? >> >> You can also follow the cool kids who these days tie some of this together >> using roxygen. > > It's not the cool kids who are doing this, it's the lazy kids ;) > Roxygen(2) does remove a considerable amount of replication between > code and documentation (e.g. replicating function usage in two > places), and the close proximity between code and documentation does > make it easier to remember to update your documentation when the code > changes. > > Roxygen2 adds a few other tools for reducing duplication like > templates, the ability to inherit parameter documentation from other > function, and the family tag to automatically add seealso references > between all members of a related family of functions. These are > things that are painful to do by hand and add a significance > maintenance burden. > > I agree that there's no silver bullet, but good tools certainly can > make life easier. > > Hadley > > -- > Assistant Professor / Dobelman Family Junior Chair > Department of Statistics / Rice University > http://had.co.nz/ > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
