Learn R Programming

chatAI4R (version 0.3.6)

RcodeImprovements: Suggest Improvements to the R Code on Your Clipboard

Description

This function uses LLM to analyze the R code from the clipboard and suggests improvements. The function can also control the verbosity and speed of the output.

Usage

RcodeImprovements(
  Summary_nch = 100,
  Model = "gpt-4o-mini",
  verbose = TRUE,
  SlowTone = FALSE
)

Value

No return value; the function prints the suggestions for code improvement.

Arguments

Summary_nch

An integer specifying the maximum number of characters for the summary. Default is 100.

Model

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

verbose

A logical value indicating whether to print the result. Default is TRUE.

SlowTone

A logical value indicating whether to print the result slowly. Default is FALSE.

Author

Satoshi Kume

Details

Suggest Improvements for R Code

Examples

Run this code
if (FALSE) {
#Copy your function to your clipboard
RcodeImprovements(Summary_nch = 100, Model = "gpt-4o-mini")
}

Run the code above in your browser using DataLab