Add support for loading RData files #11366
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds support for loading various kinds of R Data files in Positron.
There are three new ways to open these files:
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
EditorResolverServicethat, 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
.RDatafiles in Positron to import them into your R session. (R: Loading a.RDatafile from Finder #2347)Bug Fixes
QA Notes
.RDatafile with thesave.image()command