Skip to content

Commit 09dffc6

Browse files
committed
update FAQ [skip ci]
1 parent f28b020 commit 09dffc6

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

README.Rmd

+21-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,27 @@ Apart from citing the software most relevant to the particular research/analysis
241241

242242
### Some packages include several citations
243243

244-
Some packages include more than one citation (e.g. [knitr](https://cran.r-project.org/web/packages/knitr/citation.html), [mgcv](https://cran.r-project.org/web/packages/mgcv/citation.html)). `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.
244+
Some packages include more than one citation (e.g. [knitr](https://cran.r-project.org/web/packages/knitr/citation.html), [mgcv](https://cran.r-project.org/web/packages/mgcv/citation.html)). `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.
245+
246+
For example, `mgcv` package provides multiple references to be cited:
247+
248+
```{r}
249+
citation("mgcv")
250+
```
251+
252+
To choose just one of them to be cited, we could generate a citation paragraph using `cite_packages`
253+
254+
```{r eval=FALSE}
255+
cite_packages("paragraph", out.dir = ".")
256+
```
257+
258+
![](man/figures/paragraph.png)
259+
260+
And then manually remove the unwanted citation keys, leaving just those we want to cite:
261+
262+
![](man/figures/paragraph_edited.png)
263+
264+
When rendering the Rmarkdown or Quarto document, only the chosen references will be cited.
245265

246266

247267
### Removing unused packages

README.md

+26-3
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ scan_packages()
182182
1 badger 0.2.4
183183
2 base 4.4.1
184184
3 knitr 1.48
185-
4 pkgdown 2.1.0
185+
4 pkgdown 2.1.1
186186
5 remotes 2.5.0
187187
6 renv 1.0.7
188188
7 rmarkdown 2.28
@@ -312,8 +312,31 @@ Some packages include more than one citation
312312
impossible to decide automatically which citations should be included in
313313
each case. The user may manually remove citations from the produced
314314
reference list after calling `cite_packages`. If using Quarto or
315-
Rmarkdown, the unwanted references can be deleted from
316-
`grateful-refs.bib` so they will not appear cited.
315+
Rmarkdown, we can generate the citation paragraph and manually remove
316+
the unwanted references so they will not appear cited.
317+
318+
For example, `mgcv` package provides multiple references to be cited:
319+
320+
``` r
321+
citation("mgcv")
322+
```
323+
324+
To choose just one of them to be cited, we could generate a citation
325+
paragraph using `cite_packages`
326+
327+
``` r
328+
cite_packages("paragraph", out.dir = ".")
329+
```
330+
331+
![](man/figures/paragraph.png)
332+
333+
And then manually remove the unwanted citation keys, leaving just those
334+
we want to cite:
335+
336+
![](man/figures/paragraph_edited.png)
337+
338+
When rendering the Rmarkdown or Quarto document, only the chosen
339+
references will be cited.
317340

318341
### Removing unused packages
319342

0 commit comments

Comments
 (0)