Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering an .Rmd fails because stringr.rdb is corrupt?

When I render a vignette with

rmarkdown::render('/path/to/pkg/vignettes/my-vignette.Rmd')

I encounter the error

processing file: draft-vignette.Rmd
Error in get0(oNam, envir = ns) : 
  lazy-load database '/home/username/R/x86_64-pc-linux-gnu-library/3.3/stringr/R/stringr.rdb' is corrupt
In addition: Warning messages:
1: In get0(oNam, envir = ns) : restarting interrupted promise evaluation
2: In get0(oNam, envir = ns) : internal error -3 in R_decompress1

Running devtools::build_vignettes(pkg = '/path/to/pkg') produces a similar error.

Strangely,

devtools::build(pkg = '/path/to/pkg')

runs successfully, produces the compressed package file and it also renders the vignette correctly.

I have also tried removing/reinstalling the stringr package but this did not help.

I want to render only the vignette and nothing else, so how to fix the above error?

like image 843
Konstantinos Avatar asked Sep 18 '16 17:09

Konstantinos


1 Answers

Per the comment from dracodoc, just restart the R session.

like image 131
Dan Adams Avatar answered Oct 31 '22 21:10

Dan Adams