Package wyz.code.rdoc aims to generate R documentation(manual pages) directly from offensive programming instrumentation.
Read Offensive programming book to get introduction and advanced knowledge on the topic.