If you, like me, work primarily in R, I bet you’ve pulled a colleague’s scripts, tried to load the data and,
File Not Found Error.
Thanks to Jenny Bryan’s awesome blog post, I learned there’s a better solution that’s already made me overhaul my sharing workflow.
For a while, I’ve been using RStudio Projects since they’re a great way to keep work on different projects distinct. But I hadn’t considered the sharing implications…
Since the projects are stored in the form of a
.Rproj file that’s easily shareable on git, they’re also super easy to share.
- Open Project (upper right corner in RStudio) by opening
- Do work. Use
here::hereany time you need to refer to the working directory.
- Share the whole directory (including
.Rproj) like a champ.
I’ve found that this workflow makes it super easy to share projects across a team without running into issues of how your machine’s directory structure is set up (especially useful for me as some on the team are on Windows and some on Mac). As long as your directory structure is the same within the project, no more lost files!