searchFunction {chatAI4R}R Documentation

Search R Functions based on Text

Description

Searches for an R function related to the provided text either through the RStudio editor selection or clipboard.

Usage

searchFunction(
  Summary_nch = 100,
  Model = "gpt-4-0613",
  SelectedCode = TRUE,
  verbose = TRUE,
  SlowTone = FALSE
)

Arguments

Summary_nch

Numeric, number of characters to limit the function description (default = 100).

Model

String, the model used for the search, default is "gpt-4-0613".

SelectedCode

Logical, whether to get text from RStudio selection (default = TRUE).

verbose

Logical, whether to print the results verbosely (default = TRUE).

SlowTone

Logical, whether to slow down the print speed for readability (default = FALSE).

Details

Search the R function based on the provided text

This function searches for an R function that corresponds to the text provided either through the RStudio editor selection or the clipboard. It fetches the related R function and outputs its name, package, and a brief description. The function uses GPT-4 for its underlying search.

Value

Console output of the identified R function, its package, and a brief description.

Author(s)

Satoshi Kume

Examples

## Not run: 
# To search for an R function related to "linear regression"
searchFunction(Summary_nch = 50, SelectedCode = FALSE)

## End(Not run)


[Package chatAI4R version 0.2.10 Index]