Skip to content

Commit

Permalink
Merge pull request #51 from Pakillo/latex
Browse files Browse the repository at this point in the history
improve documentation #50
  • Loading branch information
Pakillo authored Aug 6, 2024
2 parents 11e7c02 + e8867e5 commit 3212e14
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 6 deletions.
6 changes: 6 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ Before running `grateful` you might want to run [`funchir::stale_package_check`]
If getting an error like "Error in (function (pkg, lib.loc = NULL): there is no package called...", that means that some of your scripts is loading a package that is no longer available in your computer, so {grateful} cannot grab its citation. To fix this, there are several options. First, you could omit that package (or those packages, if more than one) from {grateful} citations using `cite_packages(omit = c("package1", "package2")`. Alternatively, try checking if that package is still needed for your project and you want to cite it, otherwise remove or comment that line where the package is loaded. If you still use and want to cite that package, install it, and then run `cite_packages` again.


### Projects with large number of packages or files

When a project includes many used packages (or files), `renv` may issue a warning. Use `options(renv.config.dependencies.limit = 10000)` to overcome the warning and scan the project for all packages used. Alternatively, use `.renvignore` to ignore certain files or folders (see `renv` [help](https://rstudio.github.io/renv/reference/dependencies.html#ignoring-files)).



### Citing 'grateful'

```{r eval=TRUE, comment=NA}
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ Use `scan_packages`
``` r
scan_packages()
pkg version
1 badger 0.2.3
2 base 4.4.0
3 knitr 1.47
4 pkgdown 2.0.9
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.27
Expand Down Expand Up @@ -318,6 +318,15 @@ to cite it, otherwise remove or comment that line where the package is
loaded. If you still use and want to cite that package, install it, and
then run `cite_packages` again.

### Projects with large number of packages or files

When a project includes many used packages (or files), `renv` may issue
a warning. Use `options(renv.config.dependencies.limit = 10000)` to
overcome the warning and scan the project for all packages used.
Alternatively, use `.renvignore` to ignore certain files or folders (see
`renv`
[help](https://rstudio.github.io/renv/reference/dependencies.html#ignoring-files)).

### Citing ‘grateful’

``` r
Expand Down
Binary file modified Rmd_Quarto/grateful-Quarto.pdf
Binary file not shown.
15 changes: 14 additions & 1 deletion Rmd_Quarto/grateful-Quarto.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Using {grateful} with Quarto"
format: pdf
bibliography: grateful-refs.bib
# csl: "`r grateful::get_csl('journal-of-ecology', out.dir = '.')`"
# csl: https://www.zotero.org/styles/journal-of-ecology
---

Load packages
Expand Down Expand Up @@ -30,10 +30,23 @@ visreg(model)

### Software used

**Paragraph output:**

```{r}
#| echo: false
grateful::cite_packages(output = "paragraph", pkgs = "Session", out.dir = ".")
```

**Table output:**

```{r}
#| echo: false
pkgs <- grateful::cite_packages(output = "table", pkgs = "Session", out.dir = ".")
knitr::kable(pkgs)
```




## References

16 changes: 15 additions & 1 deletion Rmd_Quarto/grateful-Rmarkdown.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Using {grateful} with Rmarkdown"
output: pdf_document
bibliography: grateful-refs.bib
# csl: "`r grateful::get_csl('journal-of-ecology', out.dir = '.')`"
# csl: https://www.zotero.org/styles/journal-of-ecology
---

Load packages
Expand All @@ -29,9 +29,23 @@ visreg(model)

### Software used

**Paragraph output:**

```{r echo=FALSE}
grateful::cite_packages(output = "paragraph", pkgs = "Session", out.dir = ".")
```


**Table output:**

```{r}
#| echo: false
pkgs <- grateful::cite_packages(output = "table", pkgs = "Session", out.dir = ".")
knitr::kable(pkgs)
```



## References


Binary file modified Rmd_Quarto/grateful-Rmarkdown.pdf
Binary file not shown.
2 changes: 2 additions & 0 deletions Rmd_Quarto/separate_bibliographies/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_extensions
multibib.lua

0 comments on commit 3212e14

Please sign in to comment.