Skip to content

Local Installation

Jenna Thorstenson edited this page Aug 11, 2025 · 11 revisions

Local Installation

This repository is updated frequently, sometimes a few times a day.
We suggest users reinstall everytime before using it, so that you always have the most recent version.

1. Update R and RStudio to the most recent version.

2. Install the RTutor package

Run this code in RStudio:

# Install 'remotes' package
if (!require("remotes")) {
  install.packages("remotes")
}
library(remotes)

# Install 'heyshiny' package, for voice input
install_github("jcrodriguez1989/heyshiny", dependencies = TRUE)

# Install 'RTutor' package
install_github("gexijin/RTutor")

3. Install other R packages when prompted.

If you'd like to use additional R packages for analyzing your data, you should install those on your computer too.

4. Obtain an API key from OpenAI

  1. Create a personal account at OpenAI.
  2. After logging in, click 'Quickstart' at the sidebar on the left.
  3. Click 'Create an API key in the dashboard here' underneath the heading 'Create and export an API key'
  4. Click 'Create a new secret key' to create a key, which can be copied.
    Currently, the first $5 of usage is free. If you exceed this, add a payment method to your account.
    Then navigate to 'Usage' at the sidebar on the left and set usage limits. $3-$5 per month is more than enough for most people.

5. Use the API key with RTutor

There are several ways to do this:

  • Once RTutor is running, click on the 'Settings' tab and paste in your API key.
  • You can also save this key as a text file called "api_key.txt" in the working directory.
  • Or, you can create an environment variable called "OPEN_API_KEY" where the value is your API key. Here are the instructions for Windows, Mac, and Linux.

6. To start RTutor

Run the following code in RStudio:

library(RTutor)
run_app()

Full RTutor Wiki (.pdf, .md)

Clone this wiki locally