Open cportner opened 6 years ago
I think this is a good advantage to note. Very neat. The text is not especially long at present and I think your example could be added, but that is up to the owner. I have given your idea a +1 fwiw.
I have been using here
for a while. Indeed when I recommend this package to others I was not very sure what are the overwhelming advantages. Since if operating within a project, the directory to files is already very simple.
You're right, if your project just stays in one folder and all your files are in a stable location within or under that folder. I think here() comes into its own when you want to use sub-folders and use setwd(); here helps you avoid "../" relative reference paths as well as avoiding non-portable fixed file paths. https://twitter.com/ludictech/status/1164867065733423104
First, thank you for advertising "here". It makes it even easier to use relative paths. Second, one advantage of the package that you do not mention is that it becomes possible to do away with "paste0" commands for file names based on variables. Hence, it becomes possible to code something like this without having to mess around with "paste".
If you think it worthwhile, I can write up a smaller version of this and add it. If you think it would distract from the central message, that is fine too.