I'll double down on @mishabalyasin and @kmprioli's advise to check out here, and also suggest using RStudio's project functionality. The only time I find myself needing to use here inside an R project created with RStudio is when I am using an RMarkdown file that is saved in a subdirectory:
| data/
| data.csv
| docs/
| notebook.Rmd
| results/
| .gitignore
| LICENSE
| README
| sample.Rproj
In this case, you need here to open data.csv because the RMarkdown file will treat the docs/ subdirectory as the working directory. Using syntax like readr::read_csv(here("data", "data.csv")) makes it possible to point your notebook to the correct data/ subdirectory!