diff --git a/DESCRIPTION b/DESCRIPTION index 46223d7..c6a0ab3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: grateful Title: Facilitate Citation of R Packages -Version: 0.2.5 +Version: 0.2.6 Authors@R: c( person("Francisco", "Rodriguez-Sanchez", email = "f.rodriguez.sanc@gmail.com", diff --git a/NEWS.md b/NEWS.md index b9e4998..43e2e42 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ +# grateful 0.2.6 + +* Explain how to cite R together with a given list of packages (issue #37). + # grateful 0.2.5 * Fixed a bug in writing passive voice paragraph when generating a citation report (issue #39). diff --git a/R/cite_packages.R b/R/cite_packages.R index eb660a6..51c1776 100644 --- a/R/cite_packages.R +++ b/R/cite_packages.R @@ -84,7 +84,8 @@ #' within the project/folder (the default), or "Session" to include only packages #' used in the current session. #' Alternatively, `pkgs` can also be a character vector of package names to -#' get citations for (see examples). +#' get citations for. To cite R as well as the given packages, +#' include "base" in `pkgs` (see examples). #' #' @param omit Character vector of package names to be omitted from the citation #' report. `grateful` is omitted by default. Use `omit = NULL` to include all @@ -138,6 +139,9 @@ #' # Cite only user-provided packages: #' cite_packages(pkgs = c("renv", "remotes", "knitr"), out.dir = tempdir()) #' +#' # Cite R as well as user-provided packages +#' cite_packages(pkgs = c("base", "renv", "remotes", "knitr"), out.dir = tempdir()) +#' #' #' # To include citations in an R Markdown or Quarto file #' diff --git a/README.Rmd b/README.Rmd index 560844b..70fdbdb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -17,6 +17,7 @@ knitr::opts_chunk$set( `r badger::badge_cran_release()` ![](https://img.shields.io/github/r-package/v/Pakillo/grateful) +The diffify page for the R package grateful [![R-CMD-check](https://github.com/Pakillo/grateful/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Pakillo/grateful/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/Pakillo/grateful/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Pakillo/grateful?branch=master) `r badger::badge_lifecycle("stable")` diff --git a/README.md b/README.md index 2732297..406dd42 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![](https://www.r-pkg.org/badges/version/grateful)](https://cran.r-project.org/package=grateful) ![](https://img.shields.io/github/r-package/v/Pakillo/grateful) +The diffify page for the R package grateful [![R-CMD-check](https://github.com/Pakillo/grateful/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Pakillo/grateful/actions/workflows/R-CMD-check.yaml) [![Codecov test coverage](https://codecov.io/gh/Pakillo/grateful/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Pakillo/grateful?branch=master) diff --git a/man/cite_packages.Rd b/man/cite_packages.Rd index 8c14125..d51e673 100644 --- a/man/cite_packages.Rd +++ b/man/cite_packages.Rd @@ -59,7 +59,8 @@ should instead be defined in the YAML metadata of the document within the project/folder (the default), or "Session" to include only packages used in the current session. Alternatively, \code{pkgs} can also be a character vector of package names to -get citations for (see examples).} +get citations for. To cite R as well as the given packages, +include "base" in \code{pkgs} (see examples).} \item{omit}{Character vector of package names to be omitted from the citation report. \code{grateful} is omitted by default. Use \code{omit = NULL} to include all @@ -159,6 +160,9 @@ cite_packages(pkgs = "Session", out.dir = tempdir()) # Cite only user-provided packages: cite_packages(pkgs = c("renv", "remotes", "knitr"), out.dir = tempdir()) +# Cite R as well as user-provided packages +cite_packages(pkgs = c("base", "renv", "remotes", "knitr"), out.dir = tempdir()) + # To include citations in an R Markdown or Quarto file diff --git a/man/get_pkgs_info.Rd b/man/get_pkgs_info.Rd index c608d26..0a48d54 100644 --- a/man/get_pkgs_info.Rd +++ b/man/get_pkgs_info.Rd @@ -20,7 +20,8 @@ get_pkgs_info( within the project/folder (the default), or "Session" to include only packages used in the current session. Alternatively, \code{pkgs} can also be a character vector of package names to -get citations for (see examples).} +get citations for. To cite R as well as the given packages, +include "base" in \code{pkgs} (see examples).} \item{out.dir}{Directory to save the BibTeX file with references. It is recommended to set \code{out.dir = getwd()}.} diff --git a/man/scan_packages.Rd b/man/scan_packages.Rd index 0799c59..10b9d06 100644 --- a/man/scan_packages.Rd +++ b/man/scan_packages.Rd @@ -17,7 +17,8 @@ scan_packages( within the project/folder (the default), or "Session" to include only packages used in the current session. Alternatively, \code{pkgs} can also be a character vector of package names to -get citations for (see examples).} +get citations for. To cite R as well as the given packages, +include "base" in \code{pkgs} (see examples).} \item{omit}{Character vector of package names to be omitted from the citation report. \code{grateful} is omitted by default. Use \code{omit = NULL} to include all