here
here copied to clipboard
Empty string breaks paths
What happened:
> here::here("a", "", "b")
[1] "~/a//b"
What I expected
> here::here("a", "", "b")
[1] "~/a/b"
This is also a "feature" of file.path
. As written above its fairly silly, but if you have a variable that may or may not have a value, having here
still work would be useful. In general, here
should return something that is guaranteed to be a path (which may or may not exist).