2

The rstudioapipackage has a function openProject() with which one can non-interactively open an existing R Studio project.

In fact, there are functions in the same package for initializing/creating R Studio projects. However, I could not find anything in the documentation for closing or shutting down a project and moving into a regular R session.

How can this be done, if at all?

3
  • cran.rstudio.com/web/packages/rstudioapi/vignettes/… says you can reopen the same project, or move to another. That indirectly closes the project for another. Commented May 21, 2018 at 12:05
  • Yes, I'm aware of that. What I want is not to have any other active .Rproj Commented May 21, 2018 at 13:35
  • 1
    I don't think there's a way to do that. I suspect the RStudio people would say that working in a project is the regular way to work. Commented May 21, 2018 at 14:04

2 Answers 2

4

I realize this is old, but for those still looking, there is a function now using the rstudioapi package:

rstudioapi::executeCommand('closeProject') 
Sign up to request clarification or add additional context in comments.

Comments

2

There's no way to do this. I'd suggest filing an issue on the rstudioapi package issues page if you'd like to request the feature:

https://github.com/rstudio/rstudioapi/issues

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.