Skip to content

Conversation

@jmcphers
Copy link
Collaborator

This change adds support for loading various kinds of R Data files in Positron.

image

There are three new ways to open these files:

  • Right-click or double-click in the Explorer view
  • New R: Load Data File... command
  • Double-click/invoke in system file navigator (Mac/Win only)

The last of these is the most fiddly; in order to do this, we need to register a custom editor for RData files, even though they're not editable in the traditional sense. To work around this, we register an "editor" for the files that imports them into your R session and then closes the tab.

Note

There appears to be a bug in VS Code in the EditorResolverService that, on a cold start, doesn't wait for extensions to activate before checking for registered openers for a file type. Consequently, if you don't have Positron open at all and you double-click an Rdata file, you may get a "The file is not displayed in the text editor because it is either binary or uses an unsupported text encoding" error, as Positron tries to open the file before R's custom editor gets registered. I'm not sure if this is livable or not, but fixing it is going to require a more ambitious upstream change than I wanted to take for this scenario.

Addresses #2347.

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

  • Note that this also adds support for RDS files; the difference is that you need to supply a variable name when importing an RDS file
  • You can generate an .RData file with the save.image() command

@jmcphers jmcphers requested a review from jennybc January 13, 2026 22:05
@github-actions
Copy link

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants