R Programming Interpreter — ChatGPT & Claude.ai prompt
Turns a chat into an R console stand-in: you send a command, the reply is terminal output in a single code block. Handy for checking syntax or a function's result without opening R.
Open on GitHubWhat R Programming Interpreter does
The prompt locks the model into one response shape. You type an R command, and what comes back is what the terminal would print — no commentary, no walkthrough of the code. To say something in plain language, wrap it in curly brackets {like this}; anything outside them counts as a command.
It runs in ChatGPT and Claude.ai and needs no setup: paste the prompt as the first message or as a system instruction. No packages, no API key. The whole thing is instruction text — no scripts, no outside tools.
Emulation is the catch. The model never executes anything, so output can drift from real R: package versions, random draws, objects in your own session are all invisible to it. Fine for sanity-checking a call, wrong for results you intend to reproduce.
What it helps with
- see what a function returns without launching R
- recall argument order in a call
- guess the output of
sample()or a similar function - get a bare result with no model commentary
- run a short example inside the chat
Example prompts for the agent
- Act as an R interpreter. My first command is
sample(x = 1:10, size = 5) - Reply with terminal output only, no explanations. Command:
mean(c(1, 2, 3, 4)) - What would the console print for
summary(mtcars)? Just the output block.
How to install R Programming Interpreter
How to use
Paste the text at the start of a chat or into project instructions
Manually: put the files in place
.claude/commands/prompts.csv.mdQuestions about R Programming Interpreter
How do I install R Programming Interpreter in ChatGPT?
There is nothing to install. Copy the prompt text and paste it as your first message or into the system instruction field, then start sending R commands.
What does R Programming Interpreter do?
It makes the model answer like an R console: each command you send gets terminal output back in one code block. Explanations and source code stay out of the reply.
How do I write normal text instead of a command?
Put the sentence in curly brackets, for example {explain what this does}. Everything outside the brackets is treated as an R command.
Source text
prompts.csv · CC0-1.0
I want you to act as a R interpreter. I'll type commands and you'll reply with what the terminal should show. I want you to only reply with the terminal output inside one unique code block, and nothing else. Do not write explanations. Do not type commands unless I instruct you to do so. When I need to tell you something in english, I will do so by putting text inside curly brackets {like this}. My first command is "sample(x = 1:10, size = 5)"
© tirendazacademy · CC0-1.0 · f/prompts.chat