object 'is_R_CMD_check' not found

Hi,

I wanted to share an issue that I came across while updating my R-package.
I uploaded my package two months ago to GitHub and today, I wanted to check whether devtools::check() ran without problems and without changing anything to the code.
However, I ran into the following issues:

  1. When running devtools::check() the following error occured:
creating vignettes (14.9s) 
--- re-building ‘raincloudplots.Rmd’ using rmarkdown
object 'is_R_CMD_check' not found`
Error: Vignette re-building failed.

After reading up on some websites, I was able to resolve this error by changing the following in the Vignette YAML:

%\VignetteEngine{knitr::rmarkdown}

into

%\VignetteEngine{rmarkdown::render}

Thereafter, the devtools::check() ran until the end with the following warning:

checking files in ‘vignettes’ ... WARNING
  Files in the 'vignettes' directory but no files in 'inst/doc':
    ‘raincloudplots.Rmd’

My questions:

  1. Why would I now have to change the YAML data, while devtools::check() ran perfectly two months ago?
  2. Any suggestions on how to resolve the inst/doc warning?

Both error and warning did not occur previously on the devtools::check() when I uploaded the package two months ago.

Many thanks.

I think this is a conflict of versions.

Can you share which version you are using ?

xfun::session_info(c("rmarkdown", "knitr"))
xfun::session_info(c("rmarkdown", "knitr"))
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.4, RStudio 1.3.959

Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8

Package version:
  base64enc_0.1.3 digest_0.6.27   evaluate_0.14   glue_1.4.2     
  graphics_4.0.3  grDevices_4.0.3 highr_0.8       htmltools_0.5.0
  jsonlite_1.7.2  knitr_1.31      magrittr_2.0.1  markdown_1.1   
  methods_4.0.3   mime_0.9        rlang_0.4.10    rmarkdown_2.3  
  stats_4.0.3     stringi_1.4.6   stringr_1.4.0   tinytex_0.25   
  tools_4.0.3     utils_4.0.3     xfun_0.20       yaml_2.2.1     

Pandoc version: 2.7.3

Thanks!

You need to upgrade rmarkdown to last CRAN version (rmarkdown 2.6).

Is this possible for you ?

Thanks for your swift reply.

Yes, I have updated rmarkdown from 2.3 to 2.6.
However, I still receive the inst/doc warning.

I was mainly focus on this - with the updated rmarkdown version you should be able to use the correct vignette engine.

When you do, do you still have the other issue ?

I should have waited 1 minute with my previous reply.

I now changed back the YAML data to its original state:

from

%\VignetteEngine{rmarkdown::render}

to

%\VignetteEngine{knitr::rmarkdown}

and also VignetteBuilder in the DESCRIPTION from rmarkdown to knitr. Thereafter, devtools::check() runs 100% fine.

Thanks for your help.

1 Like

No worries !

Sorry for the trouble with this. There is a mismatched in version. I would sum it up like this:

Having knitr >= 1.31 installed implies that for vignettes rmarkdown should be >= 2.6.

1 Like

This is not a valid vignette engine, and should not be used. Could you tell us where you found this so we can ask the author to correct the false information?

BTW, when in doubt, try to update packages :slight_smile:

Hi Yihui,

Thanks for clarifying.
Yes, I found the info here (accepted solution): https://stackoverflow.com/questions/40726762/devtoolscheck-fails-because-of-vignette-building

Thanks! I'll edit the answer there.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.