document_code: ChatGPT: Document Code (in roxygen2 format)

View source: R/document_code.R

document_codeR Documentation

ChatGPT: Document Code (in roxygen2 format)

Description

ChatGPT: Document Code (in roxygen2 format)

Usage

document_code(code = clipr::read_clip(allow_non_interactive = TRUE))

Arguments

code

The code to be documented by ChatGPT. If not provided, it will use what's copied on the clipboard.

Value

A character value with the response generated by ChatGPT.

Examples

## Not run: 
cat(document_code("square_numbers <- function(numbers) numbers ** 2"))

## End(Not run)


chatgpt documentation built on May 31, 2023, 6:54 p.m.