-
Subtweet of my own tweet. This is how I introduce RStudio projects and here() in our #rstats programming course. I start our students off in RStudio.cloud, and explain how it always uses projects to begin with.
-
Where I ran into trouble was when students opened their RStudio Desktop and realized it wasn't in projects by default. I recorded this short video to help them out: youtu.be/D22THnoPA6w
-
Next: {here}. I had an Rmarkdown example in a folder within a project and I was showing how
here()lets them refer to thedata/folder in a project. -
To demonstrate, I actually move a Rmarkdown file that doesn't use
here()from the root to another folder and show that it breaks the code. -
It's been an uphill battle, but I feel like this is worth teaching, because the #1 complaint I get is that "it works interactively, but not when I knit." Any other writeups or resources that people have made would be really appreciated!