Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R "stats" citation for a scientific paper

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

like image 940
Gianni Spear Avatar asked Mar 28 '13 17:03

Gianni Spear


People also ask

How do you cite R analysis?

You get (for example): To cite R in publications use: R Core Team (2020). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria.

Do I need to cite R?

People that are "using" RStudio are mostly only using it as a text editor/for debugging tools. It is almost certainly more important to cite R than to cite RStudio.

How do you cite R codes in APA?

APA citation Formatted according to the APA Publication Manual 7th edition. Simply copy it to the References page as is. The minimal requirement is to cite the R package in text along with the version number. Additionally, you can include the reference list entry the authors of the remote package have suggested.

How do you cite an EndNote in R?

All we have to do is add a comma after R Development Core Team in the name field. This tells EndNote that R Core Development Team is a complete last name of an author that has no first name. Hence, EndNote uses what it has (a last name with no first name) in generating its citations.


2 Answers

The reviewer is wrong:

 citation("stats")  The ‘stats’ package is part of R.  To cite R in publications use:    R Core Team (2013). 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/.  A BibTeX entry for LaTeX users is    @Manual{,     title = {R: A Language and Environment for Statistical Computing},     author = {{R Core Team}},     organization = {R Foundation for Statistical Computing},     address = {Vienna, Austria},     year = {2013},     note = {{ISBN} 3-900051-07-0},     url = {http://www.R-project.org/},   }  We have invested a lot of time and effort in creating R, please cite it when using it for data analysis. See also ‘citation("pkgname")’ for citing R packages. 
like image 117
Dieter Menne Avatar answered Oct 02 '22 08:10

Dieter Menne


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).

citations <- function(includeURL = TRUE, includeRStudio = TRUE) {     if(includeRStudio == TRUE) {         ref.rstudio <- RStudio.Version()$citation         if(includeURL == FALSE) {             ref.rstudio$url <- NULL;         }         print(ref.rstudio, style = 'text')         cat('\n')     }      cit.list <- c('base', names(sessionInfo()$otherPkgs))     for(i in 1:length(cit.list)) {         ref <- citation(cit.list[i])         if(includeURL == FALSE) {             ref$url <- NULL;         }         print(ref, style = 'text')         cat('\n')     } } 

So, for example, after running

library(readr) library(dplyr) library(ggplot2) library(knitr) 

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.

like image 37
MS Berends Avatar answered Oct 02 '22 08:10

MS Berends