Package wyz.code.rdoc aims to generate R documentation manual pages directly from R code, being or not offensive programming instrumented.
Read Offensive programming book to get introduction and advanced knowledge on offensive programming advantages, practice and ecosystem.
Main chapter related to documentation generation might be of first interest.