Explore the R analysis workflow

Choose a process, then press Play or Next step. Tap a box to see what happens there.

The complete workflow. Choose a path to follow one part of the work.

Structure your R analysis for LLM coding The browser or chat app and R are on the same computer. Separate boxes show data flowing into R and R producing results. An interrupted red arrow between the data and chat app shows that the assistant cannot access the data. Prompts and replies travel to the cloud LLM. GitHub is also a cloud service. Three places. On your computer, a person runs the R code on the data, and the data stay there. GitHub holds the analysis plan, decision issues, R code, pull requests and history, and people review, decide and merge there. The AI assistant with the plugin reads the plan, issues and code from GitHub and proposes code as a pull request, which a person approves. Cleared results also go from the computer to GitHub. Code moves between the computer and GitHub, and between GitHub and the assistant; data never leave the computer. The project website is built from the code on GitHub. # Summarize the data results <- data |> count(group) IDgroupvalue 001A12 002B18 AB GroupnA24B36 Structure your R analysis for LLM coding The plugin gives the work a structure. The GitHub repository holds that structure. An AI assistant, working from it, can write the code, and people decide and approve. CLOUD SERVICES Your computer Results produces session Run and edit the code Data — stay on your computer Browser or chat app You talk to the assistant here “Help me revise this R code.” The LLM runs in the cloud GitHub Results cleared for release Analysis plan: what it must do Decision issues: open questions Pull requests and history A person reviews, approves and merges R code: the shared copy The next person starts from this record, not from a laptop or a chat Cloud LLM + plugin The plugin tells it how this kind of project works Reads the plan, questions and code Writes code on a branch; proposes it as a pull request Drafts and implements; never decides, never sees the data code changes reviewed code results cleared for release project files pull request built from the code Project website https://your-team.github.io/analysis/ Analysis project Background Methods Code Results Results by group We count the observations in each group. The code and cleared results are shown below. R code Results View the analysis plan · View the script on GitHub Code, data rows and results shown here are illustrative.
Read all explanations

R session

You run the R code on your computer. It reads the data and produces results. You can edit the code yourself. If it fails, share an error message only after checking that it contains no restricted data.

Restricted data

These data stay in the approved local environment. The red interrupted arrow means the assistant must not read them. Check outputs before sharing: a table, log or error message can also contain restricted information.

Results

R produces the tables and plots. Only results cleared for release follow the green arrow to GitHub and can appear on the website. The numbers in this diagram are illustrative.

Browser or chat app

You talk to the assistant here, on the same computer as R. The language model runs in the cloud. Ask for code changes and discuss cleared outputs without giving it restricted data.

GitHub

The shared record holds the analysis plan, decision issues, code and change history. The assistant proposes a pull request. A person reviews and approves the change before it is merged. Named deciders settle scientific questions.

Cloud LLM + plugin

The assistant reads the project instructions, plan, questions and code. The plugin guides how it works. It proposes code changes; it does not decide the science or access restricted data.

Project website

Collaborators read explanations of the actual code and cleared results without running R. Building the website does not run the analysis. The repository supplies the material used to build it.