addCommentCode {chatAI4R}R Documentation

Add Comments to R Code

Description

This function adds comments to R code without modifying the input R code. It can either take the selected code from RStudio or read from the clipboard.

Usage

addCommentCode(Model = "gpt-4-0613", language = "English", SelectedCode = TRUE)

Arguments

Model

A character string specifying the GPT model to be used. Default is "gpt-4-0613".

language

A character string specifying the language for the comments. Default is "English".

SelectedCode

A logical value indicating whether to use the selected code in RStudio. Default is TRUE.

Details

Add Comments to R Code

Value

A message indicating completion if 'SelectedCode' is TRUE, otherwise the commented code is copied to the clipboard.

Author(s)

Satoshi Kume

Examples

## Not run: 
addCommentCode(Model = "gpt-4-0613", language = "English", SelectedCode = TRUE)

## End(Not run)

[Package chatAI4R version 0.2.10 Index]