O'Reilly logo

Mastering RStudio – Develop, Communicate, and Collaborate with R by Maximilian H. Nierhoff, Julian Hillebrand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing the documentation for a package

As mentioned, the man folder contains all the necessary documentation files. It consists of R documentation files, which can be recognized by their file extension Rd.

Documenting our R code as well as possible is very important. It gives other people the chance to understand our functions and how to actually implement them into their workflow.

After creating the project, this folder contains a basic documentation file for the project in general. The R documentation files are written in the so-called Rd-format, which is closely related to LaTeX and can be processed into various output formats including HTML or plain text.

Creating Rd documentation files

We have two ways to create an Rd file:

  • We can call the

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required