diff --git a/404.html b/404.html index 990a4d8..04b15d6 100644 --- a/404.html +++ b/404.html @@ -61,7 +61,7 @@
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.
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/},
+ }
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 @@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 @@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 @@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 @@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 @@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 @@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_.