here
here copied to clipboard
Is RStudio required for `here::i_am()`?
The below is what I get when I run the command. here::here()
seems to work without the .Rproj file though.
> here::i_am("README.Rmd")
Error: Could not find associated project in working directory or any parent directory.
- Path in project: README.Rmd
- Current working directory: [path]
Please open the project associated with this file and try again.
> here::dr_here(show_reason = TRUE)
here() starts at [path].
- This directory contains a directory ".git"
- Initial working directory: [path]
- Current working directory: [path]
I had the same issue. Without the project file within R-Studio, here gives a message like above. This seems to be due to the "default directory" that is (automatically) set in the preferences. If I open the file in visual code or emacs, the problem does not happen.
Any resolution to this? I'm dying with this issue and have been at it all day - I can't find anything in the rproj.user files or anything
When I ran into this issue just now, it took me a while to realize it was a typical stupid error: I had written
here::i_am("code/model-altas.r")
where the file was actually called model-atlas.r
. So if you run into this error and cannot figure out the reason, check the spelling of your file name :see_no_evil: