gen_docs: Generate Roxygen Documentation

View source: R/gen_docs.R

gen_docsR Documentation

Generate Roxygen Documentation

Description

Generates Roxygen2 documentation for an R function based on the currently selected code.

Usage

gen_docs(prompt = NULL)

Arguments

prompt

A character string specifying additional instructions for the LLM. Defaults to a prompt requesting Roxygen2 documentation without the original code.

Value

Invisibly returns the generated documentation string, but primarily inserts the text into the RStudio console.

Examples

## Not run: 
# Select your function code in the editor, then run:
gen_docs()

# For custom instructions:
gen_docs("Generate minimal Roxygen docs for this function")

## End(Not run)


gemini.R documentation built on June 20, 2025, 5:07 p.m.

Related to gen_docs in gemini.R...