I record individual pieces of my work in R Markdown documents. I have many projects on the go but they tend to overlap, so it is not obvious from reading a document where it originated and therefore where it will be filed on my system.
I can automatically include in a document the folder in which it is filed by inserting:
```{r, echo=FALSE}
print(getwd())
```
but what I really want to do is automatically include the file name as well as the path to the folder. There is such a feature in MS Word, but is this possible in R Markdown?
These are documents created solely for my own personal use, and therefore storing the full file path is not a problem. Please do not tell me that what I want is inconsistent with reproducibility.