I analyzed my data using R package ‘stats’ (version 2.15.3). A reviewer asked me the right citation of this package and not only the common
R Core Team (2012). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/
Anyone know where i can find a valid citation to insert in my paper? Thanks
In our recent book, my co-author and I did the R citation (in the frontmatter) but also got the publisher to let us give per-package credit as well:
We felt that it was important to ensure those that did the work got credit all the way 'round.
(I wld have made this only a comment, but can't easily embed pix that way and rly didn't want to host the img somewhere.)
The reviewer is wrong:
There is now a
grateful
package that can be handy:https://github.com/Pakillo/grateful
If the package
stats
is loaded, the reference can be obtained by running:—assuming
grateful
has already been installed by running:As hrbrmstr pointed out, a function to create a list of references of only loaded packages would come in handy. As he only showed us an example and not the function, I wrote one myself which I use very often in scientific analyses and papers (sometimes combined with R Markdown).
So, for example, after running
the function
citations()
will print:RStudio Team (2016). RStudio: Integrated Development Environment for R. RStudio, Inc., Boston, MA. http://www.rstudio.com.
R Core Team (2017). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org.
Xie Y (2016). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.15.1, http://yihui.name/knitr.
Xie Y (2015). Dynamic Documents with R and knitr, 2nd edition. Chapman and Hall/CRC, Boca Raton, Florida. ISBN 978-1498716963, http://yihui.name/knitr.
Xie Y (2014). “knitr: A Comprehensive Tool for Reproducible Research in R.” In Stodden V, Leisch F and Peng RD (eds.), Implementing Reproducible Computational Research. Chapman and Hall/CRC. ISBN 978-1466561595, http://www.crcpress.com/product/isbn/9781466561595.
Wickham H (2009). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-0-387-98140-6, http://ggplot2.org.
Wickham H and Francois R (2016). dplyr: A Grammar of Data Manipulation. R package version 0.5.0, https://CRAN.R-project.org/package=dplyr.
Wickham H, Hester J and Francois R (2016). readr: Read Tabular Data. R package version 1.0.0, https://CRAN.R-project.org/package=readr.