Skip to contents

The Documentation-To-R (Doc-To-R) package uses locally-run Large Language Models to provide documentation on R code, improving the readability of code written by others (or by you a long time ago).

drllama currently offers two functions:

  • code_to_doc: Reads an .R input file and spits out a copy with a summary at the top and comments throughout the script on functions and pipes contained;
  • droxygen: Reads a function from an .R input file and spits out a roxygen2 document.

drllama is a work in progress and uses the mall package.

Installation

You can install the development version of drllama from GitHub with:

# install.packages("pak")
pak::pak("zanmat/drllama")

drllama requires having Ollama installed and running. DocToRing times will vary depending on script and model size and computing resources.