howto: Ask OpenAI to write R code for a problem. The answer is...

View source: R/cmd_howto.R

howtoR Documentation

Ask OpenAI to write R code for a problem. The answer is written to console and returned as a string.

Description

Ask OpenAI to write R code for a problem. The answer is written to console and returned as a string.

Usage

howto(do, call_api = call_openai)

Arguments

do

Character string of what you want to do

call_api

Optional function to call another API

Value

Invisible character string of R code

Examples

# You must provision an OpenAI API key before using this function.
## Not run: 
howto("read a csv file")
howto("get last element of a vector")

## End(Not run)


air documentation built on Aug. 8, 2025, 6:46 p.m.

Related to howto in air...