positron icon indicating copy to clipboard operation
positron copied to clipboard

Documentation: migration from RStudio to Positron

Open juliasilge opened this issue 1 year ago • 2 comments

In our private beta, folks very helpfully contributed ideas about what they would like to see in a migration guide from RStudio to Positron. I'm moving those ideas here:

  • [ ] how to use the RStudio keymap in Positron
  • [ ] how to launch Positron using the Project Manager extension (+ Raycast)
  • [ ] how to think about workspaces (compared to RStudio projects)
  • [ ] understanding the marketplace extensions and possibly suggesting some to try to get started
  • [ ] orientation to the panes/tabs and their analogues in RStudio, as well as tips on customizing the layout
  • [ ] R starts as a blank slate
  • [ ] differences between RStudio and Positron when it comes to git/GitHub
  • [ ] the fact that the command palette (CMD + P) in Positron is much more vital to a happy developer experience than it was in RStudio

juliasilge avatar Jul 25 '24 21:07 juliasilge

This almost reads like the current draft of the slides for my conf talk, which makes sense!

The one thing I'll mention that I don't see above is the new ease around using multiple versions of R. Of course, maybe that doesn't belong in a migration guide, because it's more of a new capability? But it might be legit, because RStudio on Windows does have a way to intervene at startup to choose the R version.

jennybc avatar Jul 25 '24 21:07 jennybc

How about a description of how the json settings work? Especially for folks who like to customize their font, look, etc.

statzhero avatar Jul 27 '24 22:07 statzhero

how to think about workspaces (compared to RStudio projects)

On this note: How do here-based (rprojroot-based) workflows carry over? (Is the recommendation now to use an explicit .here file?)

grantmcdermott avatar Jul 30 '24 16:07 grantmcdermott

If you can't rely on any other marker of project-hood, yes, placing a .here file is the safest way to go. I think that means we'll need to tweak other tooling, such as usethis, to do this more often.

I'm not really noticing a difference, since I'm almost always in a git repo and I'm almost working on a package. But I know there are many other R personas where this will be a bigger deal.

jennybc avatar Jul 30 '24 17:07 jennybc

how to think about workspaces (compared to RStudio projects)

Currently, you have both "projects" and "workspaces" in Positron. Creating a new project does not create any files like ".RProj" or ".code-workspace", it seems to be a simple folder that is listed in the "recent projects/workspaces" list. In the long term, are you planning to have both, or to use "workspaces" (maybe named as "projects")?

strengejacke avatar Jul 31 '24 11:07 strengejacke

So far, the plan is that Positron will not necessarily place a specific file or folder (although it could, if the user chooses to set some non-default setting for that workspace).

I think we do need to give careful thought to vocabulary and documentation here (around the words "project", "workspace", and "folder"). The reality is fairly simple, but it is very easy to be confused or to talk past each other.

jennybc avatar Jul 31 '24 16:07 jennybc

Let's address this dialog somewhere in the RStudio migration docs:

Image

And link to the VS Code docs on "restricted mode".

juliasilge avatar Jul 23 '25 19:07 juliasilge

Let's be sure to add info on how to get to the in-product migration guide as pointed out in https://github.com/posit-dev/positron/discussions/8811.

juliasilge avatar Aug 03 '25 22:08 juliasilge

I'd also like a guide on the differences between Positron and RStudio when building R packages - are there important differences to the workflow? Perhaps not...I've only just started using Positron so will experiment! :-)

DCEW avatar Aug 16 '25 16:08 DCEW

@DCEW I think one main difference is that there is no build pane, and you access the commands from the Command Palette instead. Another main difference is the new, super nice UI for running/managing R package tests. I myself have been using Positron as my IDE for R package development and am really happy with the experience! You can watch a screencast here if you're interested.

juliasilge avatar Aug 17 '25 20:08 juliasilge

Super helpful, thanks @juliasilge! Ooh I love the testing UI....

DCEW avatar Aug 18 '25 08:08 DCEW

We did a massive amount of work in https://github.com/posit-dev/positron-website/pull/116, which I do believe addressed nearly everything listed out in this longstanding issue.

We will track a few things to follow up in separate issues:

  • Workspace management in https://github.com/posit-dev/positron/issues/8237
  • Reworking some of the R material into a language guide (rather than a migration guide) in https://github.com/posit-dev/positron/issues/7208

juliasilge avatar Aug 19 '25 00:08 juliasilge

I've just noticed that in Positron (unlike in RStudio), I'm unable to use {rstudioapi}, which is called by svDialogs::dlgInput. The error I receive is Function showPrompt not found in Rstudio. I'm not sure if this is a problem that is already being worked on, or if its expected behaviour, but I've not found a workaround discussed online and am not a good enough programmer to really dig in and try to fix it myself. Should I add this as a bug with a reprex, or just create a new issue?

DCEW avatar Aug 19 '25 07:08 DCEW

@DCEW Can you open a new issue for us to add support for rstudioapi::showPrompt()? We have showDialog() and showQuestion() but not yet showPrompt():

https://github.com/posit-dev/ark/blob/main/crates/ark/src/modules/rstudio/dialogs.R

juliasilge avatar Aug 19 '25 15:08 juliasilge

New guide looks good!

jonvanausdeln avatar Aug 19 '25 17:08 jonvanausdeln