Pakillo / grateful

Facilitate citation of R packages
https://pakillo.github.io/grateful/
Other
224 stars 18 forks source link

Cite base R by default #37

Closed ivan-paleo closed 1 year ago

ivan-paleo commented 1 year ago

It would be nice to add an option to cite R itself when using the argument pkgs. A simple workaround is to add "base" to pkgs but this maybe could be done automatically...?

Example:

cite_packages(pkgs = c("grateful", "knitr"), output = "paragraph", out.dir = ".")

vs.

cite_packages(pkgs = c("grateful", "knitr", "base"), output = "paragraph", out.dir = ".")
Pakillo commented 1 year ago

Thanks for the suggestion @ivan-paleo

I'm unsure about this... If you want to cite both R and a specific list of packages (not all packages used in the repo, nor only those used in the session), I feel your workaround is great and simple enough. Adding another argument (e.g. cite.R = TRUE by default) increases complexity for the user, and might break some code...

ivan-paleo commented 1 year ago

That's true. Then what about mentioning explicitly in the help page to add "base" to pkgs in order to cite R? To be honest, I've always used pkgs and realized that the default (when not using that argument) was to cite R. That's why I think that adding one sentence in the help page might make it easier to find out.

Pakillo commented 1 year ago

Sure, I can certainly do that. Thanks for the suggestion!

ivan-paleo commented 1 year ago

Thank you for the great package!