if (FALSE) {
## see the active project
proj_get()
## manually set the active project
proj_set("path/to/target/project")
## build a path within the active project (both produce same result)
proj_path("R/foo.R")
proj_path("R", "foo", ext = "R")
## build a path within SOME OTHER project
with_project("path/to/some/other/project", proj_path("blah.R"))
## convince yourself that with_project() temporarily changes the project
with_project("path/to/some/other/project", print(proj_sitrep()))
}
Run the code above in your browser using DataLab