I can programmatically extract and save the name of my project by assuming that the project name is the last string after "/" in the file path generated by here::here().
here::here() %>% stringr::str_extract("[^/]*$")
Is there a safer way to access the project name programmatically? Something like project.name()
, which is a make-believe function?
I think you are looking for rstudioapi::getActiveProject()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With