Search code examples
rroxygen2

Generate citation info missing for R packages


The citation (bibtex entry) for any R package can be obtained by citation( "pkg_name" ).

Also R package repository webpage on CRAN usually has an entry called "Citation" which provides a link for the corresponding bibtex entry.

For roxygen2 package, I am unable to find the citation information. Is there a way in R to generate a citation info, if it is missing, in this case roxygen2 do not have a citation info?

I also tried this method, but it did not work.

library(devtools)
citation('roxygen2')
# Error in citation("roxygen2") : package ‘roxygen2’ not found

Solution

  • Did you forget to load the package first?

    require(roxygen2)
    citation('roxygen2')
    
    To cite package ‘roxygen2’ in publications use:
    
      Hadley Wickham, Peter Danenberg and Manuel Eugster (2017). roxygen2: In-Line Documentation for R. R package
      version 6.0.1. https://CRAN.R-project.org/package=roxygen2
    
    A BibTeX entry for LaTeX users is
    
      @Manual{,
        title = {roxygen2: In-Line Documentation for R},
        author = {Hadley Wickham and Peter Danenberg and Manuel Eugster},
        year = {2017},
        note = {R package version 6.0.1},
        url = {https://CRAN.R-project.org/package=roxygen2},
      }