Learn R Programming

gooseR (version 0.1.2)

goose_document: Generate R Documentation with AI

Description

Generate roxygen2 documentation for R functions.

Usage

goose_document(func, style = "roxygen2", examples = TRUE)

Value

Character string with documentation

Arguments

func

Function object or function name

style

Character, documentation style ("roxygen2", "detailed", "minimal")

examples

Logical, whether to generate examples

Examples

Run this code
if (FALSE) {
my_func <- function(x, y, method = "pearson") {
  cor(x, y, method = method)
}

docs <- goose_document(my_func)
cat(docs)
}

Run the code above in your browser using DataLab