Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

projects

Open a project in RStudio


Description

Initialize and open RStudio projects.

Usage

openProject(path = NULL, newSession = FALSE)

initializeProject(path = getwd())

Arguments

path

Either the path to an existing .Rproj file, or a path to a directory in which a new project should be initialized and opened.

newSession

Boolean; should the project be opened in a new session, or should the current RStudio session switch to that project? Note that TRUE values are only supported with RStudio Desktop and RStudio Server Pro.

Details

Calling openProject() without arguments effectively re-opens the currently open project in RStudio. When switching projects, users will be prompted to save any unsaved files; alternatively, you can explicitly save any open documents using documentSaveAll().

Note

The openProject and initializeProject functions were added in version 1.1.287 of RStudio.


rstudioapi

Safely Access the RStudio API

v0.13
MIT + file LICENSE
Authors
Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.