Skip to content

Simple function to generate a .bib file of R package citations.

License

Notifications You must be signed in to change notification settings

jrgant/citeRpackages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

citeRpackages

Give citeRpacks() a list of packages you want to cite, tell it what to name your file, and if you're using RStudio, indicate whether to include an entry for the program (defaults to FALSE):

my_packs <- c("ggplot2", "Hmisc", "base")

citeRpacks(my_packs, "mybibfile", RStudio = TRUE)

To cite R itself, include "base" in your package list.

The function will save a .bib file to your working directory, which you can upload to reference managers that accept them for import.

There's a StackOverflow thread cited in the code that suggests sink() may cause issues if you have another package loaded that also uses it. This is the easiest way to get a well-formed .bib file, but run at your own risk.

About

Simple function to generate a .bib file of R package citations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages