Konstantinos
Konstantinos

Reputation: 4366

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?

Upvotes: 8

Views: 6703

Answers (1)

Dan Adams
Dan Adams

Reputation: 5214

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

Upvotes: 8

Related Questions