to translate natural language into R code, which is then excuted.
You can request your analysis,
just like asking a real person.
Upload a data file (CSV, TSV/tab-delimited text files, and Excel)
and just analyze it in plain English.
Your results can be downloaded as an HTML report in minutes!
NO WARRANTY! Some of the scripts run but yield incorrect result.
Please use the auto-generated code as a starting
point for further refinement and validation.
The RTutor.ai website and the
source code (CC BY-NC 3.0 license) are freely
availble for academic and
non-profit organizations only.
Commercial use beyond testing please contact
Personal project by Dr. Steven Ge
For feedback, please email
Source code at
from where you can also find
instruction to install RTutor as an R package.
- v0.98.2 11/1/2023. Comprehensive EDA report!
- v 0.98 10/28/2023. Ask questions about code, error. Second data file upload.
- v 0.97 10/23/2023. GPT-4 becomes the default. Make ggplot2 a preferred method for plotting.
Use R environment to enable successive data manipulation.
- v 0.96 9/26/2023. Include column names in all requests. GPT-4 is available.
- v 0.95 6/11/2023. ChatGPT(gpt-3.5-turbo) becomes default model.
- v 0.94 4/21/2023. Interactive plots using CanvasXpress.
- v 0.93 3/26/2023. Change data types. Add data description. Improve voice input.
- v 0.92 3/8/2023. Includes description of data structure in prompt.
- v 0.91 2/6/2023. Voice input is improved.
Just enable micphone and say Tutor...
- v 0.90 1/15/2023. Generates and runs Pyton code in addition to R!
- v 0.8.6 1/8/2023. Add description of the levels in factors.
- v 0.8.5 1/6/2023. Demo in many foreign languages.
- v 0.8.4 1/5/2023. Collect user feedback.
- v 0.8.3 1/5/2023. Collect some user data for improvement.
- v 0.8.2 1/4/2023. Auto convert first column as row names.
- v 0.8.1 1/3/2023. Option to convert some numeric columns with few unique levels to factors.
- v 0.8.0 1/3/2023. Add description of columns (numeric vs. categorical).
- v 0.7.6 12/31/2022. Add RNA-seq data and example requests.
- v 0.7.5 12/31/2022. Redesigned UI.
- v 0.7 12/27/2022. Add EDA tab.
- v 0.6 12/27/2022. Keeps record of all code chunks for resue and report.
- v 0.5 12/24/2022. Keep current code and continue.
- v 0.4 12/23/2022. Interactive plot. Voice input optional.
- v0.3 12/20/2022. Add voice recognition.
- V0.2 12/16/2022. Add temperature control. Server reboot reminder.
- V0.1 12/11/2022. Initial launch
RTutor went viral!
Frequently asked questions:
1. What is RTutor?
It is an artificial intelligence (AI)-based app that enables
users to interact with your data via natural language.
After uploading a
dataset, users ask questions about or request analyses in
English. The app generates and runs R code to answer that question
with plots and numeric results.
2. How does RTutor work?
The requests are structured and sent to OpenAI’s AI
system, which returns R code. The R code is cleaned up and
executed in a Shiny
environment, showing results or error messages. Multiple
requests are logged to produce an R Markdown file, which can be
knitted into an HTML report. This enables record keeping
3. Can people without R coding experience use RTutor for statistical analysis?
Not entirely. This is because the generated code can be wrong.
However, it could be used to quickly conduct data
visualization, and exploratory data analysis (EDA).
Just be mindful of this experimental technology.
4. Who is it for?
The primary goal is to help people with some R experience to learn
R or be more productive. RTutor can be used to quickly speed up the
coding process using R. It gives you a draft code to test and
refine. Be wary of bugs and errors.
5. How do you make sure the results are correct?
Try to word your question differently. And try
the same request several time. A higher temperature parameter will give
diverse choices. Then users can double-check to see
if you get the same results from different runs.
6. Can you use RTutor to do R coding homework?
No. That will defy the purpose. You need to learn
R coding properly to be able to tell if the generated
R coding is correct.
7. Can private companies use RTutor?
No. It can be tried as a demo. RTutor website
dnd source code are freely available for non-profit organizations
only and distributed using the CC NC 3.0 license.
8. Can you run RTutor locally?
Yes. Download the R package and install it locally.
Then you need to obtain an API key from OpenAI.
9. Why do I get different results with the same request?
OpenAI’s language model has a certain degree of randomness
that could be adjusted by parameters called "temperature".
Set this in Settings
10. How much does the OpenAI’s cost per session?
About $0.01 to $0.1, if you send 10 to 50 requests. We have a
monthly usage limit. Once that is exceeded, the website will
not work for the month. If you use it regularly, please use
your API key. Currently, RTutor receives no funding.
We might ask users to contribute later.
11. Can this replace statisticians or data scientists?
No. But RTutor can make them more efficient.
12. How do I write my request effectively?
Imagine you have a summer intern,
a collge student
who took one semester of statistics and R. You send the
intern emails with instructions and he/she sends
back code and results. The intern is not experienced,
thus error-prone, but is hard working. Thanks to AI, this
intern is lightning fast and nearly free.
13. Can I install R package in the AI generated code?
No. But we are working to pre-install all the R
packages on the server! Right now we finished the top 5000 most
frequently used R packages. Chances are that your favorite package
is already installed.
14. Can I upload big files to the site?
Not if it is more than 10MB. Try to get a small portion of your data.
Upload it to the site to get the code, which can be run locally on your
laptop. Alternatively, download RTutor R package, and use it from your
15. The server is busy. Or the website is stuck!
Start a new browser window, not another tab. You will be assigned
to a new worker process. You can also try our mirror site
16. Voice input does not work!
One of the main reason
is that your browser block the website site from accessing the microphone.
Make sure you access the site using
With http, mic access is automatically blocked in Chrome.
Speak closer to the mic. Make sure there
is only one browser tab using the mic.
17. Is that your photo?
No. I am an old guy. The photo was synthesized by AI.
Using prompts 'statistics tutor', the image was generated by
Stable Diffusion 2.0.
If you look carefully, you can see that her fingers are messed up.