Open RStudio project by name or interactively. The projects list is read from files that contain project lists.
Usage
open_project(
pattern = NULL,
new_session = if (interactive()) NULL else TRUE,
proj_list = NULL,
proj_list_path = NULL,
only_available = TRUE,
name = NULL,
negate = FALSE
)Arguments
- pattern
(character) regular expression to narrow down the list of possible options.
- new_session
(logical|
NULL) should the project be opened in a new session, or should the current RStudio session switch to that project? Note thatTRUEvalues are only supported with RStudio Desktop and RStudio Server Pro. IfNULL, user will have to choose interactively.- proj_list
(data frame) The result of
read_projects()orNULL.- proj_list_path
(string) The path to the file with the list of project paths. If
proj_listis notNULL, thenproj_list_pathis ignored.- only_available
(logical) If
TRUE, non-existing projects and projects with broken paths are removed from the list of choices.- name
(string|
NULL) The name of the project orNULLto choose a project interactively.- negate
(logical) If
TRUE, then the options defined bypatternare excluded.
Examples
if (interactive()) {
open_project()
open_project("bio")
open_project("R-2019-project")
}