Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

path error in pkgdown article with multiple bibliographies

$
0
0

I have a vignette of a R-package with multiple bibliographies (MB), using a lua filter. When I try to turn the vignette with MB into a pkgdown article I got an error for the .lua and .bib files, that do not appeared with the vignette.

openBinaryFile: does not exist (No such file or directory

Possibly related to: https://github.com/Sage-Bionetworks/dccvalidator/pull/182. Strangely, I thought the devel version of rmarkdown avoided that problem, but currently I am using that version and problem persists.

pkgdown::build_article("index", pkg = ".", data = list(), lazy = FALSE,
  quiet = FALSE) # build index.Rmd vignette (located in vignettes folder) as article

WORKAROUND: If I use the whole path of files, problem disappears: /home/user..

Vignette (index.Rmd) with MB, example yaml section:

pkgdown:
  as_is: true
output:
  rmarkdown::html_vignette:
    toc: true
    toc_depth: 1
    number_sections: true
    pandoc_args: --lua-filter=multiple-bibliographies.lua

bibliography_normal: [allrefs.bib]
bibliography_software: [packages.bib, Rrefs.bib]
bibliography_docs: [docPackages.bib]

For testing purposes you will need a package DESCRIPTION file, one is available in link. See also link about creating a package. In order to create a vignette, install R-Studio, go to File, new file, R-markdown, From Template, Package Vignette. Important: Check the lua filter link also to learn what is MB in this Post. To add cites use [@R-plyr] in body, or use this in yaml section:

nocite: |
   @R-plyr

In order to create .bib files use:

knitr::write_bib(c("devtools","plyr","dplyr"), 'packages.bib')

Viewing all articles
Browse latest Browse all 201945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>