Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add citation information in R package

I am building my R package using Roxygen2 and devtools, and I would like to add some citation information in my R codes (i.e. I hope to write in a .R file from which the citations can be auto-generated). The ultimate goal is to display, once I run the command citation(MyPkgName), the citations of the R package as well as the citation (preferrably with BibTeX entry) of the paper I submit. Is there a way to do that using devtools? Thanks!

like image 936
alittleboy Avatar asked May 12 '13 00:05

alittleboy


People also ask

How do you cite a package in R?

citation() 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. URL http://www.R-project.org/.

Do R packages need to be cited?

Absolutely! Citations are free, and they are a blessing to the creators of those packages. Unless you're held to a strict page limit, there's no reason not to have a "methods" section in which you list all of the packages you used. It can be a single sentence.

What is the citation function in R?

The CITATION file of an R package should be placed in the inst subdirectory of the package source. The file is an R source file and may contain arbitrary R commands including conditionals and computations. Function readCitationFile() is used by citation() to extract the information in CITATION files.

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.


1 Answers

CITATION template can be created automatically with

usethis::use_citation()

Once the file is created, you only need to fill in the gaps.

like image 176
epo3 Avatar answered Sep 19 '22 17:09

epo3