Rprimo

Learn R with an  AI tutor + IDE.
Step your code forth. And back ◀.

Code for free with no account as academic or private user.

The Rprimo editor after a recorded run of a recursive countdown function: the program on the left with line 6 highlighted, the execution tape underneath with its bars climbing one level per call, the call stack three countdown() frames deep and the variable n on the right, and the tutor asking the student what the outer calls do with the returned value The Rprimo editor after a recorded run of a recursive countdown function: the program on the left with line 6 highlighted, the execution tape underneath with its bars climbing one level per call, the call stack three countdown() frames deep and the variable n on the right, and the tutor asking the student what the outer calls do with the returned value
A tutor that asks back

Our AI tutor helps you learn to code yourself.

"Why is this wrong?" is already a complete question, because the tutor sees your code, your output and the line you are on. It is prompted to answer with a question of its own and to give the next step rather than the finished code, instead of writing the program for you.

It is a language model: its answers are not deterministic, so it might depart from that, and it can be wrong.

you
My histogram has no title.
tutor
hist() takes a main = argument for the title, the same way xlab = names the axis.
Before you add it: what should the title say, so that someone who has not read your code knows which numbers they are looking at?
Quiz mode

Self-assessment quizzes, conducted by our AI tutor.

State topic, learner's level and optionally a few questions with reference answers. Then, the tutor asks questions, gives hints on request, and holds back the reference answer until the student says they are done. Nothing is scored and nothing is reported: it is practice, not assessment. Share this quiz as a URL to anybody you like.

tutor · question 2 of 4
What would countdown(0) print, and what would it return? Try to answer before you run it.
you
nothing printed, returns "liftoff"
tutor
Right on both. Now, why does print(n) never run for n = 0? Which line stops it?
Recursion on the tape

Watch the call stack over time.

The execution tape shows every step as a bar, its height shows the call depth. Recursive functions will be much easier to understand: each call climbs, and each return descends a level. Drag the marker back and the program goes with it: its variables, its output, its plots.

The execution tape under a recursive countdown function: the bars climb one level with each call, and the cursor sits at step 19 of 22 where the innermost call returns liftoff The execution tape under a recursive countdown function: the bars climb one level with each call, and the cursor sits at step 19 of 22 where the innermost call returns liftoff
A whole project in one link

Hand out an exercise as a link. That is the whole setup.

Scripts, data files, the input the program reads, breakpoints, packages, and optionally a quiz: all of it sits in the address itself, so it never touches a server. Put it on a slide, in a mail, on Moodle or on your own web pages.

rprimo.com/ide/#pz=bVPLbtswEPyVBS-1AUV13aIHB0YO7Q8UCJBDlQMtriQ2FFchKStK4H_vLi0nTdCDAL52dmZ29KKOavelUI11GNXu
3 filesscores.csvinput preparedpackage stringrquiz · 4 questions
opens from a slide a mail Moodle your web page
Notebooks that run where they are read

Interactive notebooks and course material.

Provide documentation with interactive code cells, exercises and quizzes, written as Markdown files, Jupyter or MyST notebooks, Quarto or R Markdown files. Code cells run in place or open in the main IDE, exercises are checked with test cases, and the tutor conducts the quizzes. The documents can be delivered in the same link as the code, with their saved outputs and data files.

▶Open the example

The Rprimo editor with the example document open in its tab: two R chunks, the second building on the first, each with its Console, Run here and Copy buttons, and below them the Plots tab with the year's temperature and rain drawn as two bare lines The Rprimo editor with the example document open in its tab: two R chunks, the second building on the first, each with its Console, Run here and Copy buttons, and below them the Plots tab with the year's temperature and rain drawn as two bare lines

Rprimo is its own category.

R editor

Professional data-science IDE

  • ✓Runs real R. So does Rprimo, inside the tab.
  • –Debugging built for professionals. A breakpoint debugger steps forward through a program. Rprimo records the run, so a student can also step back.
  • –Its AI is built to write code. That is what a working analyst wants from it. Rprimo's tutor is prompted for the other job: to ask back, so the student writes the line.
  • –Install or sign in first. R and an IDE on every machine, or an account for every student. Rprimo opens and runs.

Rprimo

Integrates editor and AI tutor

  • ✓A real R IDE and a teacher in one page. Instantly start coding: nothing to install, and no account to write code.
  • ✓Steps back as well as forward. The run is recorded, so a student hops to the line of interest and sees what every variable held there.
  • ✓The tutor sees the running program. Your file, your error, the step you are on. It is prompted to answer with a question, and the AI runs where you say.
  • ✓A whole exercise as a long URL. Scripts, data, input, breakpoints, packages and your own quiz questions, with no server storage and no login.

AI Tutor

Socratic chatbot

  • ✓Asks back, explains, keeps the student working. So does Rprimo's tutor.
  • –No R, no IDE. The student pastes code into a chat. Nothing runs, so the tutor guesses at output and state. Rprimo's tutor sits in the editor.
  • –Cannot see the step. No variables, no current line, no error as it happened. Rprimo's tutor sees all three.
  • –Hosted by the vendor. Prompts go to the provider's servers. Rprimo's tutor runs where you choose, on our Swiss server or your own.

For teachers, schools and universities

Nothing to run, no accounts to manage. The lesson starts with R.

Runs on the student's device

R runs inside the browser tab, on the machine in front of the student, through webR. A room of a hundred pressing Run at once costs nothing and breaks nothing: no lab image, no server, no per-seat license.

Data stays put

Files live in the browser. Links carry the project in the address. No upload: R and the packages a program asks for are downloaded, but nothing a student writes is sent anywhere. Only what a student asks the tutor goes to the tutor server, and you choose which one. It is used to write the answer and then dropped: no transcript, no quiz result and no progress data is kept, and none of it is ever handed back to the school. There is no such function to switch on.

The tutor runs where you say

Hosted by us on our own GPU server in Switzerland, where the conversation reaches no outside AI provider, or self-hosted on your own GPU server on premise, so prompts never leave your network. It is a language model, so its answers vary and it can be wrong. It grades nobody and hands nothing on, so a student can ask the question they would never risk asking in front of the class.

The tutor is the one part with a price, because running our GPU server costs money. Schools and universities license it per class, per cohort or per term. It needs a sign-in and is separable: a course keeps working without it. Everything else on this page is free for education and private use. Companies using it in their work need a license; see the terms of use. Ask for a quote

Five minutes from now you will have run a program.

Pick an example, switch Record on and press Run, then step through it.