R Documentation on Stack Overflow

A page to serve as guidelines for helping us create a good resource at Stack Overflow's new documentation feature. Visit the R Public chatroom to discuss more about the documentation.

Making good examples

Most of the guidance for creating good examples for Q&A carries over here. Make it minimal and get to the point. Overcomplicated example data and digressions are probably counterproductive. Make it self-contained to the extent possible. If linking to external resources for reference, make sure that the example stands on its own. If linking to external resources for data, well, um, try not to; and then try some more; and then try to link only to data sources that will be around with the API you're using for a very, very long time.

Some new considerations come up for documentation:

Style

Scope

As of July 2016, early in the public beta, it's still TBD what does and does not make a good example. If you want to write a tutorial rather than a simple, concise illustration, go ahead, understanding that new norms for what fits may develop.

Organization of the docs

SO has given no guidance on how they envision topics being organized, and have explained that they don't really care, since readers will come directly from search engines to a page anyways. For our own purposes, as maintainers and editors of the docs, we want to organize it so that we minimize duplication and have plenty of internal links to related examples and topics. We can figure that out as we go.


R PUBLIC