BroVic
BroVic

Reputation: 1079

Closing an RStudio project programmatically

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?

Upvotes: 2

Views: 3590

Answers (2)

user102452
user102452

Reputation: 71

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

rstudioapi::executeCommand('closeProject')

Upvotes: 4

Jonathan
Jonathan

Reputation: 8812

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

Upvotes: 2

Related Questions