8

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?

Konstantinos
  • 4,096
  • 3
  • 19
  • 28
  • 9
    I met this problem before. Maybe I just restart R session, remove and reinstall `stringr`. Or maybe I remove and installed the newer github version of `stringr`. It do need to install `stringi` from source which took quite some time. – dracodoc Sep 18 '16 at 18:20
  • 2
    !!! Restarted the R session and it worked. Thank you. – Konstantinos Sep 19 '16 at 06:21
  • Technically the error comes from zlib's uncompress error Z_DATA_ERROR (the compressed data was corrupted). – Tomas Kalibera Sep 19 '16 at 10:20

1 Answers1

7

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

Dan Adams
  • 4,971
  • 9
  • 28