Function documentation is one of the most important parts of an R package. Here we see how to document functions using so-called roxygen tags. We also use RStudio functionality to automatically enable roxygen documentation and to insert a roxygen skeleton so that we have to remember few details and just fill in our documentation text at the appropriate places.
Our example function randomly selects a song from a specified artist from a billboard hot 100s dataset, provided by the billboard package by Mikkel Freltoft Krogsholm.
Contact me, e. g. to discuss (online) R workshops / trainings / webinars:
LinkedIn: / wolfriepl
Twitter: / statistikindd
Xing: www.xing.com/profile/Wolf_Riepl
Facebook: / statistikdresden
statistik-dresden.de/kontakt
R Workshops: statistik-dresden.de/r-schulu...
Blog (German, translate option): statistik-dresden.de/statisti...
Playlist: Music chart history
• Music Chart History
Негізгі бет Ғылым және технология How to Document a Function in Your R Package
Пікірлер: 23