uncoast-unconf / uu-2019

Materials for the 2019 uncoast unconference
11 stars 4 forks source link

Poll: who uses the here package? #24

Open ellisvalentiner opened 5 years ago

ellisvalentiner commented 5 years ago

Let's take a quick poll about who already uses the here package!

Respond with 👍 if you use the here package or 👎 if you don't.

sctyner commented 5 years ago

NICE!

srvanderplas commented 5 years ago

I'll confess I use it sometimes (when writing code that's going to be used across different OS) and don't use it when I'm writing code for myself (because it only needs to work on Linux and I'm pretty consistent about setting my machines up the same).

I'd also like to point out that ./subdir/file.csv is a relative path - some of the here documentation refers to these paths as somehow worse than here("subdir", "file.csv") which is ridiculous, because the here() call evaluates to ./subdir/file.csv.

iqis commented 5 years ago

file.path() serves me pretty well in making paths cross-platform.

sctyner commented 5 years ago

I see the here package as just helping you write relative paths. If you want/need help with that, use here if not, don't.

srvanderplas commented 5 years ago

file.path() serves me pretty well in making paths cross-platform.

Yeah, I use these almost interchangeably. I probably should just default to using the baseR function instead of relying on a package.

ajmcoqui commented 5 years ago

I don't, but I feel I should because (a) I have never gotten bad advice from Jenny, and she loves here, and (b) it makes it dead simple to deploy apps and reports to other environments like shinyapps.io, Shiny Server, and Connect without having to understand the underlying file system on those servers. However, I feel like the biggest value of here is when you don't know exactly where a file is in the structure of a project. I always know the structure, so relative paths have served me well heretofore.