Closed xrotwang closed 3 years ago
Yes, it does because I decided to use groundhog. I had been thinking about giving people an option for something that isn't version-controlled if they don't want to sit through that the first time. Mind you, it only really takes time the first time through.
The title of this issue, was there actually something missing or just that you wanted another alternative that takes less time?
Yes, there was. mapproj was missing.
Hedvig Skirgård @.***> schrieb am Mo., 22. März 2021, 20:41:
The title of this issue, was there actually something missing or just that you wanted another alternative that takes less time?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HedvigS/Glottolog_look_up_table/issues/1#issuecomment-804343476, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGUOKASMADIOW3K7VFFMEDTE6MP7ANCNFSM4ZTOK5LA .
Sorry for the lack of coherence between issue title and content. "Minimal requirements" is the link here: mapproj
seemed to be missing, while tidyverse
, ape
, phytools
, etc. are probably not needed.
That's quite odd, because I don't use either of the two functions of the mapproj package. I use coord_map()
which is a function of ggplot2, which loads and installs fine. It could be that groundhog is not installing dependencies correctly, and that one of the other map packages calls in mapproj in some way. It seems like you don't want groundhog to be used for glottolog cookbook scripts so I'll use regular library etc instead for those scripts.
As to the other thing, personally the way I do things is I have a requirements script which loads everything needed for all scripts in that package. I won't do that for scripts for your glottolog cookbook though, so don't worry about it.
Tidyverse is needed in the worldmap script.
I think using groundhog is fine. I just wouldn't want to explicitly override its default functionality to write directories to the cwd.
tidyverse says it is "an opinionated collection of R packages". From my point of view, it would be a service to a user of a script, to just require the actual packages that are used, and not the whole collection (in particular because "opinionated" often is close to "controversial", and AFAIR, tidiverse ended up requiring 85 packages).
I can load the specific tidy verse packages that are needed. That's not commonly how things are done in tidyverse-R though, but if you prefer it I can adjust.
My generic preference is "minimal requirements". In the R world, requiring tidyverse seems to be some sort of position statement (see http://www.pieceofk.fr/exploring-the-cran-social-network/).
I think loading tidyverse as a whole is done because it's just simpler and shorter, and most of us use several of the tidyverse packages often. I don't have to load tidyverse packages like that though, I can load specific ones instead and I'll do that for you.
tidyverse vs base is another discussion, and I often find one that people overdramatise. Legibility and decent speed and effort is what I value, and overall my experience is that people who use tidyverse-pacakges tend to write more legible code over all.
I realise perhaps I need to clarify, I'll still use tidyverse packages (like "dplyr"), but I won't load all of tidyverse. dplyr is still a part of this opinionated set of packages.
dplyr is extremely similar to pandas, see this comparison table for example
I don't object to using any particular package. I just think including a pre-packaged collection, pulling in 85 packages, wholesale is not the most user-friendly solution to requirements management for sharing a small script.
Okay great. It seemed for a while there that you were objecting to using any tidyverse packages, not just the loading of them wholesale.
I've seen to the missing packages issue in the script I'm prepping for glottolog/cookbook. I thought they would have loaded as dependencies by other packages, but alas this isn't the case. It's solved now anyway so I'll close this issue.
It would be nice, if there'd be a minimal
requirements.R
forWorldmap_plotting.R
. With the dependencies as specified now, starting from a fresh R installation, the script takes quite some time.