From 21a2720392c2a941a9a8d1a433032a644fcf65a8 Mon Sep 17 00:00:00 2001 From: Pakillo Date: Fri, 27 Sep 2024 09:22:27 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Pakillo/?= =?UTF-8?q?grateful@09dffc68cfad1b4d755e12c07bd85e30f3a08410=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- LICENSE-text.html | 2 +- LICENSE.html | 2 +- authors.html | 2 +- index.html | 44 ++++++++++++++++++++------------ news/index.html | 2 +- pkgdown.js | 8 ++++++ pkgdown.yml | 4 +-- reference/cite_packages.html | 2 +- reference/get_citations.html | 2 +- reference/get_csl.html | 2 +- reference/get_pkgs_info.html | 2 +- reference/grateful-package.html | 2 +- reference/index.html | 2 +- reference/nocite_references.html | 2 +- reference/scan_packages.html | 2 +- search.json | 2 +- 17 files changed, 51 insertions(+), 33 deletions(-) diff --git a/404.html b/404.html index 990a4d8..04b15d6 100644 --- a/404.html +++ b/404.html @@ -61,7 +61,7 @@

Page not found (404)

diff --git a/LICENSE-text.html b/LICENSE-text.html index 80285f8..31a14a7 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -44,7 +44,7 @@

License

diff --git a/LICENSE.html b/LICENSE.html index 95c1385..074bb99 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -48,7 +48,7 @@

MIT License

diff --git a/authors.html b/authors.html index 1ee6255..3dba67a 100644 --- a/authors.html +++ b/authors.html @@ -77,7 +77,7 @@

Citation

diff --git a/index.html b/index.html index 48f758e..99aa9ec 100644 --- a/index.html +++ b/index.html @@ -139,7 +139,7 @@

Getting just a tab 1 badger 0.2.4 2 base 4.4.1 3 knitr 1.48 -4 pkgdown 2.1.0 +4 pkgdown 2.1.1 5 remotes 2.5.0 6 renv 1.0.7 7 rmarkdown 2.28 @@ -209,7 +209,17 @@

What software to cite?

Some packages include several citations

-

Some packages include more than one citation (e.g. knitr, mgcv). grateful will include all those citations by default, as it is impossible to decide automatically which citations should be included in each case. The user may manually remove citations from the produced reference list after calling cite_packages. If using Quarto or Rmarkdown, the unwanted references can be deleted from grateful-refs.bib so they will not appear cited.

+

Some packages include more than one citation (e.g. knitr, mgcv). grateful will include all those citations by default, as it is impossible to decide automatically which citations should be included in each case. The user may manually remove citations from the produced reference list after calling cite_packages. If using Quarto or Rmarkdown, we can generate the citation paragraph and manually remove the unwanted references so they will not appear cited.

+

For example, mgcv package provides multiple references to be cited:

+
+citation("mgcv")
+

To choose just one of them to be cited, we could generate a citation paragraph using cite_packages

+
+cite_packages("paragraph", out.dir = ".")
+

+

And then manually remove the unwanted citation keys, leaving just those we want to cite:

+

+

When rendering the Rmarkdown or Quarto document, only the chosen references will be cited.

Removing unused packages @@ -229,20 +239,20 @@

Projects with large num

Citing ‘grateful’

-
citation("grateful")
-To cite package 'grateful' in publications use:
-
-  Rodriguez-Sanchez F, Jackson C (2024). _grateful: Facilitate citation
-  of R packages_. <https://pakillo.github.io/grateful/>.
-
-A BibTeX entry for LaTeX users is
-
-  @Manual{,
-    title = {grateful: Facilitate citation of {R} packages},
-    author = {Francisco Rodriguez-Sanchez and Connor P. Jackson},
-    year = {2024},
-    url = {https://pakillo.github.io/grateful/},
-  }
+
citation("grateful")
+To cite package 'grateful' in publications use:
+
+  Rodriguez-Sanchez F, Jackson C (2024). _grateful: Facilitate citation
+  of R packages_. <https://pakillo.github.io/grateful/>.
+
+A BibTeX entry for LaTeX users is
+
+  @Manual{,
+    title = {grateful: Facilitate citation of {R} packages},
+    author = {Francisco Rodriguez-Sanchez and Connor P. Jackson},
+    year = {2024},
+    url = {https://pakillo.github.io/grateful/},
+  }

@@ -307,7 +317,7 @@

Dev status

diff --git a/news/index.html b/news/index.html index 7a14586..294476c 100644 --- a/news/index.html +++ b/news/index.html @@ -122,7 +122,7 @@

grateful 0.1.5 diff --git a/pkgdown.js b/pkgdown.js index 9757bf9..1a99c65 100644 --- a/pkgdown.js +++ b/pkgdown.js @@ -152,3 +152,11 @@ async function searchFuse(query, callback) { }); }); })(window.jQuery || window.$) + +document.addEventListener('keydown', function(event) { + // Check if the pressed key is '/' + if (event.key === '/') { + event.preventDefault(); // Prevent any default action associated with the '/' key + document.getElementById('search-input').focus(); // Set focus to the search input + } +}); diff --git a/pkgdown.yml b/pkgdown.yml index c0a1dd7..edeb2fd 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,8 +1,8 @@ pandoc: 3.1.11 -pkgdown: 2.1.0 +pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-09-15T16:11Z +last_built: 2024-09-27T09:22Z urls: reference: https://pakillo.github.io/grateful/reference article: https://pakillo.github.io/grateful/articles diff --git a/reference/cite_packages.html b/reference/cite_packages.html index ff610e0..0bb6b81 100644 --- a/reference/cite_packages.html +++ b/reference/cite_packages.html @@ -255,7 +255,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/get_citations.html b/reference/get_citations.html index 6ba4a77..c0e4b05 100644 --- a/reference/get_citations.html +++ b/reference/get_citations.html @@ -96,7 +96,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/get_csl.html b/reference/get_csl.html index b2fd596..a908e1f 100644 --- a/reference/get_csl.html +++ b/reference/get_csl.html @@ -77,7 +77,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/get_pkgs_info.html b/reference/get_pkgs_info.html index 443f8cf..4f8e25b 100644 --- a/reference/get_pkgs_info.html +++ b/reference/get_pkgs_info.html @@ -129,7 +129,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/grateful-package.html b/reference/grateful-package.html index 6fb8017..f5de495 100644 --- a/reference/grateful-package.html +++ b/reference/grateful-package.html @@ -61,7 +61,7 @@

Author< diff --git a/reference/index.html b/reference/index.html index 1930fb9..d4b8f04 100644 --- a/reference/index.html +++ b/reference/index.html @@ -87,7 +87,7 @@

All functions -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/nocite_references.html b/reference/nocite_references.html index 7cab321..7bbd4bd 100644 --- a/reference/nocite_references.html +++ b/reference/nocite_references.html @@ -113,7 +113,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/reference/scan_packages.html b/reference/scan_packages.html index f6b3349..6064388 100644 --- a/reference/scan_packages.html +++ b/reference/scan_packages.html @@ -105,7 +105,7 @@

Examples -

Site built with pkgdown 2.1.0.

+

Site built with pkgdown 2.1.1.

diff --git a/search.json b/search.json index d6e15bb..5cc9c17 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://pakillo.github.io/grateful/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 grateful authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://pakillo.github.io/grateful/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Francisco Rodriguez-Sanchez. Author, maintainer, copyright holder. Connor P. Jackson. Author. Shaurita D. Hutchins. Contributor. James M. Clawson. Contributor.","code":""},{"path":"https://pakillo.github.io/grateful/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rodriguez-Sanchez F, Jackson C (2024). grateful: Facilitate citation R packages. https://pakillo.github.io/grateful/.","code":"@Manual{, title = {grateful: Facilitate citation of {R} packages}, author = {Francisco Rodriguez-Sanchez and Connor P. Jackson}, year = {2024}, url = {https://pakillo.github.io/grateful/}, }"},{"path":"https://pakillo.github.io/grateful/index.html","id":"grateful-facilitate-citation-of-r-packages","dir":"","previous_headings":"","what":"Facilitate Citation of R Packages","title":"Facilitate Citation of R Packages","text":"goal grateful make easy cite R R packages used analyses, package authors receive deserved credit. calling single function, grateful scan project R packages used generate BibTeX file containing citations packages. grateful can generate new document citations desired output format (Word, PDF, LaTeX, HTML, Markdown). references can formatted specific journal, can just paste directly manuscript report. Alternatively, can use grateful directly within Rmarkdown Quarto document. case, paragraph containing -text citations used R packages (optionally) inserted Rmarkdown/Quarto document, packages included reference list rendering.","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Facilitate Citation of R Packages","text":"can install stable release {grateful} CRAN: latest development version R-universe: GitHub:","code":"install.packages(\"grateful\") install.packages(\"grateful\", repos = c(\"https://pakillo.r-universe.dev\", \"https://cloud.r-project.org\")) # install.packages(\"remotes\") remotes::install_github(\"Pakillo/grateful\")"},{"path":"https://pakillo.github.io/grateful/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Facilitate Citation of R Packages","text":"grateful can used one two ways: generate ‘citation report’ listing package citations build citation keys incorporate existing R Markdown Quarto document.","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"example","dir":"","previous_headings":"Usage","what":"Example","title":"Facilitate Citation of R Packages","text":"Imagine project using packages: dplyr, ggplot2, vegan lme4. want collect citations listed packages, well citation base R (RStudio, applicable).","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"generate-a-document-with-formatted-citations","dir":"","previous_headings":"Usage","what":"Generate a document with formatted citations","title":"Facilitate Citation of R Packages","text":"Calling cite_packages() scan project, find packages, generate document formatted citations. document can also Word LaTeX document, PDF file, markdown file, left source Rmarkdown file using .format: can specify citation style particular journal using citation.style. cases BibTeX (.bib) file package citations saved disk.","code":"library(grateful) cite_packages(out.dir = \".\") # save report to working directory cite_packages(out.format = \"docx\", out.dir = \".\") cite_packages(citation.style = \"peerj\", out.dir = \".\")"},{"path":"https://pakillo.github.io/grateful/index.html","id":"using-grateful-with-rmarkdown-or-quarto","dir":"","previous_headings":"Usage","what":"Using grateful with Rmarkdown or Quarto","title":"Facilitate Citation of R Packages","text":"building document RMarkdown Quarto want cite R packages, grateful can automatically generate BibTeX file ensure packages cited appropriate format (see template Rmarkdown Quarto documents). First, include reference BibTeX file YAML header. (Note: can reference multiple BibTeX files, needed) call cite_packages(output = \"paragraph\") within code chunk (block inline) automatically include paragraph mentioning used packages, include references bibliography list. used R version 4.2.3 [@base] following R packages: lme4 v. 1.1.32 [@lme4], tidyverse v. 2.0.0 [@tidyverse], vegan v. 2.6.4 [@vegan]. Alternatively, can get table package name, version, citations, using output = 'table': want references appear particular format, can specify citation style YAML header: Alternatively, can cite particular packages using citation keys generated grateful, BibTeX reference, just include citations References section, using function nocite_references(). See package help RMarkdown cookbook details.","code":"bibliography: grateful-refs.bib bibliography: - document_citations.bib - grateful-refs.bib ```{r} cite_packages(output = \"paragraph\", out.dir = \".\") ``` ```{r } pkgs <- cite_packages(output = \"table\", out.dir = \".\") knitr::kable(pkgs) ``` bibliography: grateful-refs.bib csl: peerj.csl"},{"path":[]},{"path":"https://pakillo.github.io/grateful/index.html","id":"getting-just-a-table-with-used-packages-and-versions","dir":"","previous_headings":"Frequently Asked Questions","what":"Getting just a table with used packages and versions","title":"Facilitate Citation of R Packages","text":"Use scan_packages","code":"scan_packages() pkg version 1 badger 0.2.4 2 base 4.4.1 3 knitr 1.48 4 pkgdown 2.1.0 5 remotes 2.5.0 6 renv 1.0.7 7 rmarkdown 2.28 8 testthat 3.2.1.1 9 tidyverse 2.0.0 10 visreg 2.7.0"},{"path":"https://pakillo.github.io/grateful/index.html","id":"producing-a-bibtex-file-with-package-references","dir":"","previous_headings":"Frequently Asked Questions","what":"Producing a BibTeX file with package references","title":"Facilitate Citation of R Packages","text":"just want get package references BibTeX file, can call get_pkgs_info(). Besides printing table package info, also save BibTeX file references. default, file called grateful-refs.bib, can change (see function help). want get BibTeX references specific packages:","code":"get_pkgs_info(pkgs = c(\"remotes\", \"renv\"), out.dir = getwd()) #> pkg version citekeys #> 1 remotes 2.5.0 remotes #> 2 renv 1.0.7 renv"},{"path":"https://pakillo.github.io/grateful/index.html","id":"using-grateful-with-the-tidyverse","dir":"","previous_headings":"Frequently Asked Questions","what":"Using grateful with the tidyverse","title":"Facilitate Citation of R Packages","text":"use one several packages tidyverse, can choose cite ‘tidyverse’ rather individual packages:","code":"cite_packages(cite.tidyverse = TRUE)"},{"path":"https://pakillo.github.io/grateful/index.html","id":"including-package-dependencies","dir":"","previous_headings":"Frequently Asked Questions","what":"Including package dependencies","title":"Facilitate Citation of R Packages","text":"R packages also depend packages. include package dependencies citations, rather just packages called directly, use dependencies = TRUE:","code":"cite_packages(dependencies = TRUE)"},{"path":"https://pakillo.github.io/grateful/index.html","id":"what-about-external-software-dependencies","dir":"","previous_headings":"Frequently Asked Questions","what":"What about external software dependencies?","title":"Facilitate Citation of R Packages","text":"R packages wrap core external software perhaps cited . example, rjags R wrapper JAGS software written C++. Ideally, R packages wrapping core external software include CITATION file. otherwise, can investigate external software requirements used packages, e.g. using remotes:","code":"remotes::system_requirements(package = c(\"rjags\"), os = \"ubuntu-20.04\") #> [1] \"apt-get install -y jags\""},{"path":"https://pakillo.github.io/grateful/index.html","id":"what-software-to-cite","dir":"","previous_headings":"Frequently Asked Questions","what":"What software to cite?","title":"Facilitate Citation of R Packages","text":"Citing software pretty much like citing papers. Authors decide cite case, depends research context. written Software Citation Principles paper (Smith et al. 2016): software citation principles define software cited, rather software cited. software cited decision author(s) research work context community norms practices, research communities, currently flux. general, believe software cited basis research product paper book; , authors cite appropriate set software products just cite appropriate set papers, perhaps following FORCE11 Data Citation Working Group principles, state, “scholarly literature, whenever wherever claim relies upon data, corresponding data cited” guidelines Software Citation Checklist: cite software significant impact research outcome presented work, way research conducted. research presenting repeatable without piece software, cite software. Note license copyright software bearing whether cite . might include: Software (including scripts) written conduct research presented. software framework / platform upon software wrote conduct research relies. Software packages, plugins, modules libraries used conduct research perform critical role results. Software used simulate model phenomena/systems. Specialist software (considered commonplace field) used prepare, manage, analyse visualise data. Software evaluated compared part research presented Software produced analytic results output, especially used interface. general, need cite: Software packages libraries fundamental work normal part computational scientific environment used. dependencies need cited outright documented part computational workflow complete reproducibility. Software used course research impact research results, e.g. word processing software, backup software. Apart citing software relevant particular research/analysis performed, think good idea record entire computational environment elsewhere, e.g. using sessionInfo() sessioninfo::session_info().","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"some-packages-include-several-citations","dir":"","previous_headings":"Frequently Asked Questions","what":"Some packages include several citations","title":"Facilitate Citation of R Packages","text":"packages include one citation (e.g. knitr, mgcv). grateful include citations default, impossible decide automatically citations included case. user may manually remove citations produced reference list calling cite_packages. using Quarto Rmarkdown, unwanted references can deleted grateful-refs.bib appear cited.","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"removing-unused-packages","dir":"","previous_headings":"Frequently Asked Questions","what":"Removing unused packages","title":"Facilitate Citation of R Packages","text":"running grateful might want run funchir::stale_package_check annotater check unused packages citing .","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"error-there-is-no-package-called","dir":"","previous_headings":"Frequently Asked Questions","what":"Error: there is no package called…","title":"Facilitate Citation of R Packages","text":"getting error like “Error (function (pkg, lib.loc = NULL): package called…”, means scripts loading package longer available computer, {grateful} grab citation. fix , several options. First, omit package (packages, one) {grateful} citations using cite_packages(omit = c(\"package1\", \"package2\"). Alternatively, try checking package still needed project want cite , otherwise remove comment line package loaded. still use want cite package, install , run cite_packages .","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"projects-with-large-number-of-packages-or-files","dir":"","previous_headings":"Frequently Asked Questions","what":"Projects with large number of packages or files","title":"Facilitate Citation of R Packages","text":"project includes many used packages (files), renv may issue warning. Use options(renv.config.dependencies.limit = 10000) overcome warning scan project packages used. Alternatively, use .renvignore ignore certain files folders (see renv help).","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"citing-grateful","dir":"","previous_headings":"Frequently Asked Questions","what":"Citing ‘grateful’","title":"Facilitate Citation of R Packages","text":"","code":"citation(\"grateful\") To cite package 'grateful' in publications use: Rodriguez-Sanchez F, Jackson C (2024). _grateful: Facilitate citation of R packages_. . A BibTeX entry for LaTeX users is @Manual{, title = {grateful: Facilitate citation of {R} packages}, author = {Francisco Rodriguez-Sanchez and Connor P. Jackson}, year = {2024}, url = {https://pakillo.github.io/grateful/}, }"},{"path":"https://pakillo.github.io/grateful/index.html","id":"limitations","dir":"","previous_headings":"","what":"Limitations","title":"Facilitate Citation of R Packages","text":"Citation keys guaranteed preserved regenerated, particularly packages updated. instability issue citations used programmatically, example . references put text manually, may need updated periodically.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Cite R packages used in a project — cite_packages","title":"Cite R packages used in a project — cite_packages","text":"Find R packages used project, create BibTeX file references, generate document formatted package citations. Alternatively, cite_packages can run directly within 'R Markdown' 'Quarto' document automatically include paragraph citing used packages generate bibliography.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cite R packages used in a project — cite_packages","text":"","code":"cite_packages( output = c(\"file\", \"paragraph\", \"table\", \"citekeys\"), out.dir = NULL, out.format = c(\"html\", \"docx\", \"pdf\", \"Rmd\", \"md\", \"tex-fragment\", \"tex-document\"), citation.style = NULL, pkgs = \"All\", omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, include.RStudio = FALSE, passive.voice = FALSE, out.file = \"grateful-report\", bib.file = \"grateful-refs\", ... )"},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cite R packages used in a project — cite_packages","text":"output Either \"file\" generate separate document formatted citations packages; \"paragraph\" return paragraph -text citations used packages, suitable used within 'R Markdown' 'Quarto' document; \"table\" return table package name, version, citations, used 'R Markdown' 'Quarto'; \"citekeys\" return vector citation keys. cases, BibTeX file package references saved disk (see bib.file). .dir Directory save output document BibTeX file references. recommended set .dir = getwd(). .format Output format output = \"file\": either \"html\" (default), \"docx\" (Word), \"pdf\", \"tex-fragment\" (LaTeX fragment inserted another LaTeX document), \"tex-document\" (full LaTeX document), \"Rmd\", \"md\" (markdown). (Note choosing \"pdf\" requires working installation LaTeX, see https://yihui.org/tinytex/). citation.style Optional. Citation style format references particular journal (see https://bookdown.org/yihui/rmarkdown-cookbook/bibliography.html). CSL available .dir, downloaded automatically official GitHub repository using get_csl(). using cite_packages() within R Markdown Quarto document, citation.style NULL (default). citation style instead defined YAML metadata document (see https://pakillo.github.io/grateful/#using-grateful--rmarkdown--quarto). pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . include.RStudio Logical. TRUE, adds citation current version RStudio. passive.voice Logical. TRUE, uses passive voice paragraph generated citations. .file Desired name citation report created output = \"file\". Default \"grateful-report\" (without extension). bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cite R packages used in a project — cite_packages","text":"output = \"file\", cite_packages save two files .dir: BibTeX file containing package references citation report formatted citations. cite_packages return path citation report invisibly. output = \"table\" output = \"paragraph\", cite_packages return table paragraph package citations suitable used within 'R Markdown' 'Quarto' documents.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cite R packages used in a project — cite_packages","text":"cite_packages wrapper function collects package names versions saves citation information BibTeX file (using get_pkgs_info()). , function designed handle different use cases: output = \"file\", cite_packages() generate 'R Markdown' file includes paragraph -text citations packages, well references list. document can knitted various formats via .format. References can formatted particular journal using citation.style. Thus, output = \"file\" best obtaining document separate R, just cut paste citations. output = \"paragraph\", cite_packages() return paragraph -text citations packages, suitable used directly 'R Markdown' 'Quarto' document. , include reference generated bib.file bibliography file YAML header document (see https://pakillo.github.io/grateful/index.html#using-grateful-within-rmarkdown). Alternatively, output = \"table\", cite_packages() return table package names, versions, citations. Thus, using 'R Markdown' 'Quarto', can choose getting table text paragraph citing packages. Finally, can use output = \"citekeys\" obtain vector citation keys, call nocite_references() within 'R Markdown' 'Quarto' document cite packages reference list without mentioning text.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"limitations","dir":"Reference","previous_headings":"","what":"Limitations","title":"Cite R packages used in a project — cite_packages","text":"Citation keys guaranteed preserved regenerated, particularly packages updated. instability issue citations used programmatically, example . references put text manually, may need updated periodically.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cite R packages used in a project — cite_packages","text":"","code":"if (FALSE) { # interactive() # To build a standalone document for citations cite_packages(out.dir = tempdir()) # Format references for a particular journal: cite_packages(citation.style = \"peerj\", out.dir = tempdir()) # Choose different output format: cite_packages(out.format = \"docx\", out.dir = tempdir()) # Cite only packages currently loaded: 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 # include this in YAML header: # bibliography: grateful-refs.bib # then call cite_packages within an R chunk: cite_packages(output = \"paragraph\", out.dir = tempdir()) # To include package citations in the reference list of an Rmarkdown document # without citing them in the text, include this in a chunk: nocite_references(cite_packages(output = \"citekeys\", out.dir = tempdir())) }"},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":null,"dir":"Reference","previous_headings":"","what":"Get citations for packages — get_citations","title":"Get citations for packages — get_citations","text":"Get citations packages","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get citations for packages — get_citations","text":"","code":"get_citations( pkgs = NULL, out.dir = NULL, bib.file = \"grateful-refs\", include.RStudio = FALSE )"},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get citations for packages — get_citations","text":"pkgs Character vector package names, e.g. obtained scan_packages(). .dir Directory save output document BibTeX file references. recommended set .dir = getwd(). bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). include.RStudio Logical. TRUE, adds citation current version RStudio.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get citations for packages — get_citations","text":"file specified .dir containing package references BibTeX format. assigned name, get_citations also return list citation keys package (without @).","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get citations for packages — get_citations","text":"","code":"if (FALSE) { # interactive() citekeys <- get_citations(c(\"knitr\", \"renv\"), out.dir = tempdir()) pkgs <- scan_packages() citekeys <- get_citations(pkgs$pkg, out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a journal citation style from the official internet repository — get_csl","title":"Get a journal citation style from the official internet repository — get_csl","text":"Get journal citation style official internet repository","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a journal citation style from the official internet repository — get_csl","text":"","code":"get_csl(name = NULL, out.dir = NULL)"},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a journal citation style from the official internet repository — get_csl","text":"name Name journal, exactly found https://github.com/citation-style-language/styles. .dir Directory save CSL file.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a journal citation style from the official internet repository — get_csl","text":"CSL file saved selected directory, path returned invisibly.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a journal citation style from the official internet repository — get_csl","text":"","code":"if (FALSE) { # interactive() get_csl(\"peerj\", out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get information about packages used in a project — get_pkgs_info","title":"Get information about packages used in a project — get_pkgs_info","text":"function scans project R packages used, saves BibTeX file package references, returns data frame package names, version, citation keys.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get information about packages used in a project — get_pkgs_info","text":"","code":"get_pkgs_info( pkgs = \"All\", out.dir = NULL, omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, bib.file = \"grateful-refs\", include.RStudio = FALSE, ... )"},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get information about packages used in a project — get_pkgs_info","text":"pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). .dir Directory save BibTeX file references. recommended set .dir = getwd(). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). include.RStudio Logical. TRUE, adds citation current version RStudio. ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get information about packages used in a project — get_pkgs_info","text":"data.frame package info, file containing package references BibTeX format.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get information about packages used in a project — get_pkgs_info","text":"","code":"if (FALSE) { # interactive() get_pkgs_info(out.dir = tempdir()) get_pkgs_info(pkgs = c(\"renv\", \"remotes\"), out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/grateful-package.html","id":null,"dir":"Reference","previous_headings":"","what":"grateful: Facilitate Citation of R Packages — grateful-package","title":"grateful: Facilitate Citation of R Packages — grateful-package","text":"Facilitates citation R packages used analysis projects. Scans project packages used, gets citations, produces document citations preferred bibliography format, ready pasted reports manuscripts. Alternatively, 'grateful' can used directly within 'R Markdown' 'Quarto' document.","code":""},{"path":[]},{"path":"https://pakillo.github.io/grateful/reference/grateful-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"grateful: Facilitate Citation of R Packages — grateful-package","text":"Maintainer: Francisco Rodriguez-Sanchez f.rodriguez.sanc@gmail.com (ORCID) [copyright holder] Authors: Connor P. Jackson connor@cpjackson.net (ORCID) contributors: Shaurita D. Hutchins [contributor] James M. Clawson [contributor]","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Nocite Block — nocite_references","title":"Generate Nocite Block — nocite_references","text":"Include metadata block citation keys including citations references file without -text citations.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Nocite Block — nocite_references","text":"","code":"nocite_references(citekeys, citation_processor = c(\"pandoc\", \"latex\"))"},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Nocite Block — nocite_references","text":"citekeys Vector citation keys reference relevant BibTeX file. citation_processor Mechanism citation processing knitting PDF otherwise using LaTeX. Selects appropriate formatting nocite command. Either \"pandoc\" \"latex\". processing pandoc-citeproc, use nocite metadata block. processing via LaTeX processor natbib biblatex, put LaTeX \\nocite{} command directly. knitting non-LaTeX format, parameter ignored, pandoc-citeproc style block used.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Nocite Block — nocite_references","text":"\"\" text metadata block, comma-separated list citation keys.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate Nocite Block — nocite_references","text":"passed list citation keys, adds @ , builds nocite metadata field, returning via \"-\" output. Run function either inline within code chunk (echo = FALSE) include metadata block within RMarkdown document. code chunk need explicitly state results = 'asis'. Call nocite_references either style = 'pandoc' style = 'latex' depending whether processing citations pandoc-citeproc LaTeX citation processor biblatex natbib. function intended cite R packages citation keys passed get_citations() cite_packages(output = \"citekeys\"), can accept arbitrary vector citation keys (without @) found BibTeX file referenced YAML header.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate Nocite Block — nocite_references","text":"Connor P. Jackson","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate Nocite Block — nocite_references","text":"","code":"if (FALSE) { # interactive() # include in YAML header: # bibliography: grateful-refs.bib # Get citation keys for the current RMarkdown document # (run after all packages have been loaded). citekeys <- cite_packages(output = \"citekeys\", out.dir = tempdir()) # Include in RMarkdown body for use with pandoc-citeproc: # `r nocite_references(citekeys, citation_processor = 'pandoc')` }"},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Scan a project or folder for packages used — scan_packages","title":"Scan a project or folder for packages used — scan_packages","text":"Scan project folder packages used","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scan a project or folder for packages used — scan_packages","text":"","code":"scan_packages( pkgs = \"All\", omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, ... )"},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scan a project or folder for packages used — scan_packages","text":"pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scan a project or folder for packages used — scan_packages","text":"data.frame package names versions","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scan a project or folder for packages used — scan_packages","text":"","code":"if (FALSE) { # interactive() scan_packages() scan_packages(pkgs = \"Session\") scan_packages(pkgs = c(\"renv\", \"remotes\", \"knitr\")) }"},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0210","dir":"Changelog","previous_headings":"","what":"grateful 0.2.10","title":"grateful 0.2.10","text":"CRAN release: 2024-09-04 Add support LaTeX output (thanks @patrick-weiss suggestion). Use .format = \"tex-document\" obtain full LaTeX document, .format = \"tex-fragment\" produce just fragment citing packages copied another existing LaTeX document.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-029","dir":"Changelog","previous_headings":"","what":"grateful 0.2.9","title":"grateful 0.2.9","text":"Match package names citation keys explicitly, rather relying sorting.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-028","dir":"Changelog","previous_headings":"","what":"grateful 0.2.8","title":"grateful 0.2.8","text":"Fix problem citation keys containing non-alphanumeric characters (-) (issue #44, thanks @jkylearmstrong).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-027","dir":"Changelog","previous_headings":"","what":"grateful 0.2.7","title":"grateful 0.2.7","text":"Enable citing Rstudio ‘table’ output format (issue #41).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-026","dir":"Changelog","previous_headings":"","what":"grateful 0.2.6","title":"grateful 0.2.6","text":"Explain cite R together given list packages (issue #37).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-025","dir":"Changelog","previous_headings":"","what":"grateful 0.2.5","title":"grateful 0.2.5","text":"Fixed bug writing passive voice paragraph generating citation report (issue #39).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-024","dir":"Changelog","previous_headings":"","what":"grateful 0.2.4","title":"grateful 0.2.4","text":"CRAN release: 2023-10-22 Fixed bug package doc (cf. https://github.com/r-lib/roxygen2/issues/1491).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-023","dir":"Changelog","previous_headings":"","what":"grateful 0.2.3","title":"grateful 0.2.3","text":"Fixed bug downloading ‘dependent’ citation styles official repository.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-022","dir":"Changelog","previous_headings":"","what":"grateful 0.2.2","title":"grateful 0.2.2","text":"Removed tests likely fail future (issue #36)","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-021","dir":"Changelog","previous_headings":"","what":"grateful 0.2.1","title":"grateful 0.2.1","text":"Citation paragraph can now written passive voice, thanks @jmclawson","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-020","dir":"Changelog","previous_headings":"","what":"grateful 0.2.0","title":"grateful 0.2.0","text":"CRAN release: 2023-04-24 Added omit argument exclude packages citation report. Argument cite.grateful removed, use omit = c(\"grateful\") instead. Increased robustness: tests argument checks added.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0113","dir":"Changelog","previous_headings":"","what":"grateful 0.1.13","title":"grateful 0.1.13","text":".dir must now provided user (.dir = getwd() allowed per CRAN policy) Rmd.file .name arguments cite_packages fused single .file argument CITATION now uses bibentry rather citEntry.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0112","dir":"Changelog","previous_headings":"","what":"grateful 0.1.12","title":"grateful 0.1.12","text":"Fully revised documentation README, including examples running grateful Quarto. Added many tests using grateful within ‘R Markdown’, longer necessary specify chunk option results = \"asis\" (thanks @connorp)","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0110","dir":"Changelog","previous_headings":"","what":"grateful 0.1.10","title":"grateful 0.1.10","text":"Fixed bug matching citekeys package names containing punctuation characters.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-019","dir":"Changelog","previous_headings":"","what":"grateful 0.1.9","title":"grateful 0.1.9","text":"Fixed potential bug matching package names citation keys. Now using strict regex.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-017","dir":"Changelog","previous_headings":"","what":"grateful 0.1.7","title":"grateful 0.1.7","text":"New option output = “table” produce table package names, version, citation, used within ‘R Markdown’ document.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-015","dir":"Changelog","previous_headings":"","what":"grateful 0.1.5","title":"grateful 0.1.5","text":"Now including package versions, besides package name. packages specifying one reference CITATION file, use . Rather list package names, grateful now returns text paragraph citing R used packages, ready pasted manuscript report. Now including base R citation cases. Can optionally add RStudio . grateful can now used within ‘R Markdown’. Including chunk cite_packages(output = \"paragraph\") introduce paragraph -text citations R used packages, citations formatted rendering ‘R Markdown’ document. also possible cite particular packages using BibTeX keys generated grateful. include reference list without citing -text, using new nocite_references() function. New argument cite.tidyverse collapse citations used tidyverse packages single citation ‘tidyverse’. New argument dependencies include package dependencies citation list.","code":""}] +[{"path":"https://pakillo.github.io/grateful/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022 grateful authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://pakillo.github.io/grateful/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Francisco Rodriguez-Sanchez. Author, maintainer, copyright holder. Connor P. Jackson. Author. Shaurita D. Hutchins. Contributor. James M. Clawson. Contributor.","code":""},{"path":"https://pakillo.github.io/grateful/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Rodriguez-Sanchez F, Jackson C (2024). grateful: Facilitate citation R packages. https://pakillo.github.io/grateful/.","code":"@Manual{, title = {grateful: Facilitate citation of {R} packages}, author = {Francisco Rodriguez-Sanchez and Connor P. Jackson}, year = {2024}, url = {https://pakillo.github.io/grateful/}, }"},{"path":"https://pakillo.github.io/grateful/index.html","id":"grateful-facilitate-citation-of-r-packages","dir":"","previous_headings":"","what":"Facilitate Citation of R Packages","title":"Facilitate Citation of R Packages","text":"goal grateful make easy cite R R packages used analyses, package authors receive deserved credit. calling single function, grateful scan project R packages used generate BibTeX file containing citations packages. grateful can generate new document citations desired output format (Word, PDF, LaTeX, HTML, Markdown). references can formatted specific journal, can just paste directly manuscript report. Alternatively, can use grateful directly within Rmarkdown Quarto document. case, paragraph containing -text citations used R packages (optionally) inserted Rmarkdown/Quarto document, packages included reference list rendering.","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Facilitate Citation of R Packages","text":"can install stable release {grateful} CRAN: latest development version R-universe: GitHub:","code":"install.packages(\"grateful\") install.packages(\"grateful\", repos = c(\"https://pakillo.r-universe.dev\", \"https://cloud.r-project.org\")) # install.packages(\"remotes\") remotes::install_github(\"Pakillo/grateful\")"},{"path":"https://pakillo.github.io/grateful/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Facilitate Citation of R Packages","text":"grateful can used one two ways: generate ‘citation report’ listing package citations build citation keys incorporate existing R Markdown Quarto document.","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"example","dir":"","previous_headings":"Usage","what":"Example","title":"Facilitate Citation of R Packages","text":"Imagine project using packages: dplyr, ggplot2, vegan lme4. want collect citations listed packages, well citation base R (RStudio, applicable).","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"generate-a-document-with-formatted-citations","dir":"","previous_headings":"Usage","what":"Generate a document with formatted citations","title":"Facilitate Citation of R Packages","text":"Calling cite_packages() scan project, find packages, generate document formatted citations. document can also Word LaTeX document, PDF file, markdown file, left source Rmarkdown file using .format: can specify citation style particular journal using citation.style. cases BibTeX (.bib) file package citations saved disk.","code":"library(grateful) cite_packages(out.dir = \".\") # save report to working directory cite_packages(out.format = \"docx\", out.dir = \".\") cite_packages(citation.style = \"peerj\", out.dir = \".\")"},{"path":"https://pakillo.github.io/grateful/index.html","id":"using-grateful-with-rmarkdown-or-quarto","dir":"","previous_headings":"Usage","what":"Using grateful with Rmarkdown or Quarto","title":"Facilitate Citation of R Packages","text":"building document RMarkdown Quarto want cite R packages, grateful can automatically generate BibTeX file ensure packages cited appropriate format (see template Rmarkdown Quarto documents). First, include reference BibTeX file YAML header. (Note: can reference multiple BibTeX files, needed) call cite_packages(output = \"paragraph\") within code chunk (block inline) automatically include paragraph mentioning used packages, include references bibliography list. used R version 4.2.3 [@base] following R packages: lme4 v. 1.1.32 [@lme4], tidyverse v. 2.0.0 [@tidyverse], vegan v. 2.6.4 [@vegan]. Alternatively, can get table package name, version, citations, using output = 'table': want references appear particular format, can specify citation style YAML header: Alternatively, can cite particular packages using citation keys generated grateful, BibTeX reference, just include citations References section, using function nocite_references(). See package help RMarkdown cookbook details.","code":"bibliography: grateful-refs.bib bibliography: - document_citations.bib - grateful-refs.bib ```{r} cite_packages(output = \"paragraph\", out.dir = \".\") ``` ```{r } pkgs <- cite_packages(output = \"table\", out.dir = \".\") knitr::kable(pkgs) ``` bibliography: grateful-refs.bib csl: peerj.csl"},{"path":[]},{"path":"https://pakillo.github.io/grateful/index.html","id":"getting-just-a-table-with-used-packages-and-versions","dir":"","previous_headings":"Frequently Asked Questions","what":"Getting just a table with used packages and versions","title":"Facilitate Citation of R Packages","text":"Use scan_packages","code":"scan_packages() pkg version 1 badger 0.2.4 2 base 4.4.1 3 knitr 1.48 4 pkgdown 2.1.1 5 remotes 2.5.0 6 renv 1.0.7 7 rmarkdown 2.28 8 testthat 3.2.1.1 9 tidyverse 2.0.0 10 visreg 2.7.0"},{"path":"https://pakillo.github.io/grateful/index.html","id":"producing-a-bibtex-file-with-package-references","dir":"","previous_headings":"Frequently Asked Questions","what":"Producing a BibTeX file with package references","title":"Facilitate Citation of R Packages","text":"just want get package references BibTeX file, can call get_pkgs_info(). Besides printing table package info, also save BibTeX file references. default, file called grateful-refs.bib, can change (see function help). want get BibTeX references specific packages:","code":"get_pkgs_info(pkgs = c(\"remotes\", \"renv\"), out.dir = getwd()) #> pkg version citekeys #> 1 remotes 2.5.0 remotes #> 2 renv 1.0.7 renv"},{"path":"https://pakillo.github.io/grateful/index.html","id":"using-grateful-with-the-tidyverse","dir":"","previous_headings":"Frequently Asked Questions","what":"Using grateful with the tidyverse","title":"Facilitate Citation of R Packages","text":"use one several packages tidyverse, can choose cite ‘tidyverse’ rather individual packages:","code":"cite_packages(cite.tidyverse = TRUE)"},{"path":"https://pakillo.github.io/grateful/index.html","id":"including-package-dependencies","dir":"","previous_headings":"Frequently Asked Questions","what":"Including package dependencies","title":"Facilitate Citation of R Packages","text":"R packages also depend packages. include package dependencies citations, rather just packages called directly, use dependencies = TRUE:","code":"cite_packages(dependencies = TRUE)"},{"path":"https://pakillo.github.io/grateful/index.html","id":"what-about-external-software-dependencies","dir":"","previous_headings":"Frequently Asked Questions","what":"What about external software dependencies?","title":"Facilitate Citation of R Packages","text":"R packages wrap core external software perhaps cited . example, rjags R wrapper JAGS software written C++. Ideally, R packages wrapping core external software include CITATION file. otherwise, can investigate external software requirements used packages, e.g. using remotes:","code":"remotes::system_requirements(package = c(\"rjags\"), os = \"ubuntu-20.04\") #> [1] \"apt-get install -y jags\""},{"path":"https://pakillo.github.io/grateful/index.html","id":"what-software-to-cite","dir":"","previous_headings":"Frequently Asked Questions","what":"What software to cite?","title":"Facilitate Citation of R Packages","text":"Citing software pretty much like citing papers. Authors decide cite case, depends research context. written Software Citation Principles paper (Smith et al. 2016): software citation principles define software cited, rather software cited. software cited decision author(s) research work context community norms practices, research communities, currently flux. general, believe software cited basis research product paper book; , authors cite appropriate set software products just cite appropriate set papers, perhaps following FORCE11 Data Citation Working Group principles, state, “scholarly literature, whenever wherever claim relies upon data, corresponding data cited” guidelines Software Citation Checklist: cite software significant impact research outcome presented work, way research conducted. research presenting repeatable without piece software, cite software. Note license copyright software bearing whether cite . might include: Software (including scripts) written conduct research presented. software framework / platform upon software wrote conduct research relies. Software packages, plugins, modules libraries used conduct research perform critical role results. Software used simulate model phenomena/systems. Specialist software (considered commonplace field) used prepare, manage, analyse visualise data. Software evaluated compared part research presented Software produced analytic results output, especially used interface. general, need cite: Software packages libraries fundamental work normal part computational scientific environment used. dependencies need cited outright documented part computational workflow complete reproducibility. Software used course research impact research results, e.g. word processing software, backup software. Apart citing software relevant particular research/analysis performed, think good idea record entire computational environment elsewhere, e.g. using sessionInfo() sessioninfo::session_info().","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"some-packages-include-several-citations","dir":"","previous_headings":"Frequently Asked Questions","what":"Some packages include several citations","title":"Facilitate Citation of R Packages","text":"packages include one citation (e.g. knitr, mgcv). grateful include citations default, impossible decide automatically citations included case. user may manually remove citations produced reference list calling cite_packages. using Quarto Rmarkdown, can generate citation paragraph manually remove unwanted references appear cited. example, mgcv package provides multiple references cited: choose just one cited, generate citation paragraph using cite_packages manually remove unwanted citation keys, leaving just want cite: rendering Rmarkdown Quarto document, chosen references cited.","code":"citation(\"mgcv\") cite_packages(\"paragraph\", out.dir = \".\")"},{"path":"https://pakillo.github.io/grateful/index.html","id":"removing-unused-packages","dir":"","previous_headings":"Frequently Asked Questions","what":"Removing unused packages","title":"Facilitate Citation of R Packages","text":"running grateful might want run funchir::stale_package_check annotater check unused packages citing .","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"error-there-is-no-package-called","dir":"","previous_headings":"Frequently Asked Questions","what":"Error: there is no package called…","title":"Facilitate Citation of R Packages","text":"getting error like “Error (function (pkg, lib.loc = NULL): package called…”, means scripts loading package longer available computer, {grateful} grab citation. fix , several options. First, omit package (packages, one) {grateful} citations using cite_packages(omit = c(\"package1\", \"package2\"). Alternatively, try checking package still needed project want cite , otherwise remove comment line package loaded. still use want cite package, install , run cite_packages .","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"projects-with-large-number-of-packages-or-files","dir":"","previous_headings":"Frequently Asked Questions","what":"Projects with large number of packages or files","title":"Facilitate Citation of R Packages","text":"project includes many used packages (files), renv may issue warning. Use options(renv.config.dependencies.limit = 10000) overcome warning scan project packages used. Alternatively, use .renvignore ignore certain files folders (see renv help).","code":""},{"path":"https://pakillo.github.io/grateful/index.html","id":"citing-grateful","dir":"","previous_headings":"Frequently Asked Questions","what":"Citing ‘grateful’","title":"Facilitate Citation of R Packages","text":"","code":"citation(\"grateful\") To cite package 'grateful' in publications use: Rodriguez-Sanchez F, Jackson C (2024). _grateful: Facilitate citation of R packages_. . A BibTeX entry for LaTeX users is @Manual{, title = {grateful: Facilitate citation of {R} packages}, author = {Francisco Rodriguez-Sanchez and Connor P. Jackson}, year = {2024}, url = {https://pakillo.github.io/grateful/}, }"},{"path":"https://pakillo.github.io/grateful/index.html","id":"limitations","dir":"","previous_headings":"","what":"Limitations","title":"Facilitate Citation of R Packages","text":"Citation keys guaranteed preserved regenerated, particularly packages updated. instability issue citations used programmatically, example . references put text manually, may need updated periodically.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Cite R packages used in a project — cite_packages","title":"Cite R packages used in a project — cite_packages","text":"Find R packages used project, create BibTeX file references, generate document formatted package citations. Alternatively, cite_packages can run directly within 'R Markdown' 'Quarto' document automatically include paragraph citing used packages generate bibliography.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cite R packages used in a project — cite_packages","text":"","code":"cite_packages( output = c(\"file\", \"paragraph\", \"table\", \"citekeys\"), out.dir = NULL, out.format = c(\"html\", \"docx\", \"pdf\", \"Rmd\", \"md\", \"tex-fragment\", \"tex-document\"), citation.style = NULL, pkgs = \"All\", omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, include.RStudio = FALSE, passive.voice = FALSE, out.file = \"grateful-report\", bib.file = \"grateful-refs\", ... )"},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cite R packages used in a project — cite_packages","text":"output Either \"file\" generate separate document formatted citations packages; \"paragraph\" return paragraph -text citations used packages, suitable used within 'R Markdown' 'Quarto' document; \"table\" return table package name, version, citations, used 'R Markdown' 'Quarto'; \"citekeys\" return vector citation keys. cases, BibTeX file package references saved disk (see bib.file). .dir Directory save output document BibTeX file references. recommended set .dir = getwd(). .format Output format output = \"file\": either \"html\" (default), \"docx\" (Word), \"pdf\", \"tex-fragment\" (LaTeX fragment inserted another LaTeX document), \"tex-document\" (full LaTeX document), \"Rmd\", \"md\" (markdown). (Note choosing \"pdf\" requires working installation LaTeX, see https://yihui.org/tinytex/). citation.style Optional. Citation style format references particular journal (see https://bookdown.org/yihui/rmarkdown-cookbook/bibliography.html). CSL available .dir, downloaded automatically official GitHub repository using get_csl(). using cite_packages() within R Markdown Quarto document, citation.style NULL (default). citation style instead defined YAML metadata document (see https://pakillo.github.io/grateful/#using-grateful--rmarkdown--quarto). pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . include.RStudio Logical. TRUE, adds citation current version RStudio. passive.voice Logical. TRUE, uses passive voice paragraph generated citations. .file Desired name citation report created output = \"file\". Default \"grateful-report\" (without extension). bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cite R packages used in a project — cite_packages","text":"output = \"file\", cite_packages save two files .dir: BibTeX file containing package references citation report formatted citations. cite_packages return path citation report invisibly. output = \"table\" output = \"paragraph\", cite_packages return table paragraph package citations suitable used within 'R Markdown' 'Quarto' documents.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cite R packages used in a project — cite_packages","text":"cite_packages wrapper function collects package names versions saves citation information BibTeX file (using get_pkgs_info()). , function designed handle different use cases: output = \"file\", cite_packages() generate 'R Markdown' file includes paragraph -text citations packages, well references list. document can knitted various formats via .format. References can formatted particular journal using citation.style. Thus, output = \"file\" best obtaining document separate R, just cut paste citations. output = \"paragraph\", cite_packages() return paragraph -text citations packages, suitable used directly 'R Markdown' 'Quarto' document. , include reference generated bib.file bibliography file YAML header document (see https://pakillo.github.io/grateful/index.html#using-grateful-within-rmarkdown). Alternatively, output = \"table\", cite_packages() return table package names, versions, citations. Thus, using 'R Markdown' 'Quarto', can choose getting table text paragraph citing packages. Finally, can use output = \"citekeys\" obtain vector citation keys, call nocite_references() within 'R Markdown' 'Quarto' document cite packages reference list without mentioning text.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"limitations","dir":"Reference","previous_headings":"","what":"Limitations","title":"Cite R packages used in a project — cite_packages","text":"Citation keys guaranteed preserved regenerated, particularly packages updated. instability issue citations used programmatically, example . references put text manually, may need updated periodically.","code":""},{"path":"https://pakillo.github.io/grateful/reference/cite_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cite R packages used in a project — cite_packages","text":"","code":"if (FALSE) { # interactive() # To build a standalone document for citations cite_packages(out.dir = tempdir()) # Format references for a particular journal: cite_packages(citation.style = \"peerj\", out.dir = tempdir()) # Choose different output format: cite_packages(out.format = \"docx\", out.dir = tempdir()) # Cite only packages currently loaded: 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 # include this in YAML header: # bibliography: grateful-refs.bib # then call cite_packages within an R chunk: cite_packages(output = \"paragraph\", out.dir = tempdir()) # To include package citations in the reference list of an Rmarkdown document # without citing them in the text, include this in a chunk: nocite_references(cite_packages(output = \"citekeys\", out.dir = tempdir())) }"},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":null,"dir":"Reference","previous_headings":"","what":"Get citations for packages — get_citations","title":"Get citations for packages — get_citations","text":"Get citations packages","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get citations for packages — get_citations","text":"","code":"get_citations( pkgs = NULL, out.dir = NULL, bib.file = \"grateful-refs\", include.RStudio = FALSE )"},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get citations for packages — get_citations","text":"pkgs Character vector package names, e.g. obtained scan_packages(). .dir Directory save output document BibTeX file references. recommended set .dir = getwd(). bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). include.RStudio Logical. TRUE, adds citation current version RStudio.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get citations for packages — get_citations","text":"file specified .dir containing package references BibTeX format. assigned name, get_citations also return list citation keys package (without @).","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_citations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get citations for packages — get_citations","text":"","code":"if (FALSE) { # interactive() citekeys <- get_citations(c(\"knitr\", \"renv\"), out.dir = tempdir()) pkgs <- scan_packages() citekeys <- get_citations(pkgs$pkg, out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a journal citation style from the official internet repository — get_csl","title":"Get a journal citation style from the official internet repository — get_csl","text":"Get journal citation style official internet repository","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a journal citation style from the official internet repository — get_csl","text":"","code":"get_csl(name = NULL, out.dir = NULL)"},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a journal citation style from the official internet repository — get_csl","text":"name Name journal, exactly found https://github.com/citation-style-language/styles. .dir Directory save CSL file.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a journal citation style from the official internet repository — get_csl","text":"CSL file saved selected directory, path returned invisibly.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_csl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a journal citation style from the official internet repository — get_csl","text":"","code":"if (FALSE) { # interactive() get_csl(\"peerj\", out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Get information about packages used in a project — get_pkgs_info","title":"Get information about packages used in a project — get_pkgs_info","text":"function scans project R packages used, saves BibTeX file package references, returns data frame package names, version, citation keys.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get information about packages used in a project — get_pkgs_info","text":"","code":"get_pkgs_info( pkgs = \"All\", out.dir = NULL, omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, bib.file = \"grateful-refs\", include.RStudio = FALSE, ... )"},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get information about packages used in a project — get_pkgs_info","text":"pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). .dir Directory save BibTeX file references. recommended set .dir = getwd(). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . bib.file Desired name BibTeX file containing packages references (\"grateful-refs\" default). include.RStudio Logical. TRUE, adds citation current version RStudio. ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get information about packages used in a project — get_pkgs_info","text":"data.frame package info, file containing package references BibTeX format.","code":""},{"path":"https://pakillo.github.io/grateful/reference/get_pkgs_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get information about packages used in a project — get_pkgs_info","text":"","code":"if (FALSE) { # interactive() get_pkgs_info(out.dir = tempdir()) get_pkgs_info(pkgs = c(\"renv\", \"remotes\"), out.dir = tempdir()) }"},{"path":"https://pakillo.github.io/grateful/reference/grateful-package.html","id":null,"dir":"Reference","previous_headings":"","what":"grateful: Facilitate Citation of R Packages — grateful-package","title":"grateful: Facilitate Citation of R Packages — grateful-package","text":"Facilitates citation R packages used analysis projects. Scans project packages used, gets citations, produces document citations preferred bibliography format, ready pasted reports manuscripts. Alternatively, 'grateful' can used directly within 'R Markdown' 'Quarto' document.","code":""},{"path":[]},{"path":"https://pakillo.github.io/grateful/reference/grateful-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"grateful: Facilitate Citation of R Packages — grateful-package","text":"Maintainer: Francisco Rodriguez-Sanchez f.rodriguez.sanc@gmail.com (ORCID) [copyright holder] Authors: Connor P. Jackson connor@cpjackson.net (ORCID) contributors: Shaurita D. Hutchins [contributor] James M. Clawson [contributor]","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate Nocite Block — nocite_references","title":"Generate Nocite Block — nocite_references","text":"Include metadata block citation keys including citations references file without -text citations.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate Nocite Block — nocite_references","text":"","code":"nocite_references(citekeys, citation_processor = c(\"pandoc\", \"latex\"))"},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate Nocite Block — nocite_references","text":"citekeys Vector citation keys reference relevant BibTeX file. citation_processor Mechanism citation processing knitting PDF otherwise using LaTeX. Selects appropriate formatting nocite command. Either \"pandoc\" \"latex\". processing pandoc-citeproc, use nocite metadata block. processing via LaTeX processor natbib biblatex, put LaTeX \\nocite{} command directly. knitting non-LaTeX format, parameter ignored, pandoc-citeproc style block used.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate Nocite Block — nocite_references","text":"\"\" text metadata block, comma-separated list citation keys.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate Nocite Block — nocite_references","text":"passed list citation keys, adds @ , builds nocite metadata field, returning via \"-\" output. Run function either inline within code chunk (echo = FALSE) include metadata block within RMarkdown document. code chunk need explicitly state results = 'asis'. Call nocite_references either style = 'pandoc' style = 'latex' depending whether processing citations pandoc-citeproc LaTeX citation processor biblatex natbib. function intended cite R packages citation keys passed get_citations() cite_packages(output = \"citekeys\"), can accept arbitrary vector citation keys (without @) found BibTeX file referenced YAML header.","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Generate Nocite Block — nocite_references","text":"Connor P. Jackson","code":""},{"path":"https://pakillo.github.io/grateful/reference/nocite_references.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Generate Nocite Block — nocite_references","text":"","code":"if (FALSE) { # interactive() # include in YAML header: # bibliography: grateful-refs.bib # Get citation keys for the current RMarkdown document # (run after all packages have been loaded). citekeys <- cite_packages(output = \"citekeys\", out.dir = tempdir()) # Include in RMarkdown body for use with pandoc-citeproc: # `r nocite_references(citekeys, citation_processor = 'pandoc')` }"},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":null,"dir":"Reference","previous_headings":"","what":"Scan a project or folder for packages used — scan_packages","title":"Scan a project or folder for packages used — scan_packages","text":"Scan project folder packages used","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scan a project or folder for packages used — scan_packages","text":"","code":"scan_packages( pkgs = \"All\", omit = c(\"grateful\"), cite.tidyverse = TRUE, dependencies = FALSE, ... )"},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scan a project or folder for packages used — scan_packages","text":"pkgs Character. Either \"\" include packages used scripts within project/folder (default), \"Session\" include packages used current session. Alternatively, pkgs can also character vector package names get citations . cite R well given packages, include \"base\" pkgs (see examples). omit Character vector package names omitted citation report. grateful omitted default. Use omit = NULL include packages. cite.tidyverse Logical. TRUE, tidyverse packages (dplyr, ggplot2, etc) collapsed single citation 'tidyverse', recommended tidyverse team. dependencies Logical. Include dependencies used packages? TRUE, include packages used packages depend . ... parameters passed renv::dependencies().","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scan a project or folder for packages used — scan_packages","text":"data.frame package names versions","code":""},{"path":"https://pakillo.github.io/grateful/reference/scan_packages.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scan a project or folder for packages used — scan_packages","text":"","code":"if (FALSE) { # interactive() scan_packages() scan_packages(pkgs = \"Session\") scan_packages(pkgs = c(\"renv\", \"remotes\", \"knitr\")) }"},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0210","dir":"Changelog","previous_headings":"","what":"grateful 0.2.10","title":"grateful 0.2.10","text":"CRAN release: 2024-09-04 Add support LaTeX output (thanks @patrick-weiss suggestion). Use .format = \"tex-document\" obtain full LaTeX document, .format = \"tex-fragment\" produce just fragment citing packages copied another existing LaTeX document.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-029","dir":"Changelog","previous_headings":"","what":"grateful 0.2.9","title":"grateful 0.2.9","text":"Match package names citation keys explicitly, rather relying sorting.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-028","dir":"Changelog","previous_headings":"","what":"grateful 0.2.8","title":"grateful 0.2.8","text":"Fix problem citation keys containing non-alphanumeric characters (-) (issue #44, thanks @jkylearmstrong).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-027","dir":"Changelog","previous_headings":"","what":"grateful 0.2.7","title":"grateful 0.2.7","text":"Enable citing Rstudio ‘table’ output format (issue #41).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-026","dir":"Changelog","previous_headings":"","what":"grateful 0.2.6","title":"grateful 0.2.6","text":"Explain cite R together given list packages (issue #37).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-025","dir":"Changelog","previous_headings":"","what":"grateful 0.2.5","title":"grateful 0.2.5","text":"Fixed bug writing passive voice paragraph generating citation report (issue #39).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-024","dir":"Changelog","previous_headings":"","what":"grateful 0.2.4","title":"grateful 0.2.4","text":"CRAN release: 2023-10-22 Fixed bug package doc (cf. https://github.com/r-lib/roxygen2/issues/1491).","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-023","dir":"Changelog","previous_headings":"","what":"grateful 0.2.3","title":"grateful 0.2.3","text":"Fixed bug downloading ‘dependent’ citation styles official repository.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-022","dir":"Changelog","previous_headings":"","what":"grateful 0.2.2","title":"grateful 0.2.2","text":"Removed tests likely fail future (issue #36)","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-021","dir":"Changelog","previous_headings":"","what":"grateful 0.2.1","title":"grateful 0.2.1","text":"Citation paragraph can now written passive voice, thanks @jmclawson","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-020","dir":"Changelog","previous_headings":"","what":"grateful 0.2.0","title":"grateful 0.2.0","text":"CRAN release: 2023-04-24 Added omit argument exclude packages citation report. Argument cite.grateful removed, use omit = c(\"grateful\") instead. Increased robustness: tests argument checks added.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0113","dir":"Changelog","previous_headings":"","what":"grateful 0.1.13","title":"grateful 0.1.13","text":".dir must now provided user (.dir = getwd() allowed per CRAN policy) Rmd.file .name arguments cite_packages fused single .file argument CITATION now uses bibentry rather citEntry.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0112","dir":"Changelog","previous_headings":"","what":"grateful 0.1.12","title":"grateful 0.1.12","text":"Fully revised documentation README, including examples running grateful Quarto. Added many tests using grateful within ‘R Markdown’, longer necessary specify chunk option results = \"asis\" (thanks @connorp)","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-0110","dir":"Changelog","previous_headings":"","what":"grateful 0.1.10","title":"grateful 0.1.10","text":"Fixed bug matching citekeys package names containing punctuation characters.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-019","dir":"Changelog","previous_headings":"","what":"grateful 0.1.9","title":"grateful 0.1.9","text":"Fixed potential bug matching package names citation keys. Now using strict regex.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-017","dir":"Changelog","previous_headings":"","what":"grateful 0.1.7","title":"grateful 0.1.7","text":"New option output = “table” produce table package names, version, citation, used within ‘R Markdown’ document.","code":""},{"path":"https://pakillo.github.io/grateful/news/index.html","id":"grateful-015","dir":"Changelog","previous_headings":"","what":"grateful 0.1.5","title":"grateful 0.1.5","text":"Now including package versions, besides package name. packages specifying one reference CITATION file, use . Rather list package names, grateful now returns text paragraph citing R used packages, ready pasted manuscript report. Now including base R citation cases. Can optionally add RStudio . grateful can now used within ‘R Markdown’. Including chunk cite_packages(output = \"paragraph\") introduce paragraph -text citations R used packages, citations formatted rendering ‘R Markdown’ document. also possible cite particular packages using BibTeX keys generated grateful. include reference list without citing -text, using new nocite_references() function. New argument cite.tidyverse collapse citations used tidyverse packages single citation ‘tidyverse’. New argument dependencies include package dependencies citation list.","code":""}]