[R-pkg-devel] Check errors for RMarkdown vignettes with error chunks

Tim Taylor t|m@t@y|or @end|ng |rom h|ddene|eph@nt@@co@uk
Fri Jun 7 15:58:12 CEST 2024


Does this issue over in knitr shed some additional light ...

https://github.com/yihui/knitr/issues/2338

Tim

On 07/06/2024 14:50, Ivan Krylov via R-package-devel wrote:
> В Fri, 7 Jun 2024 09:10:03 +0200
> "C.H." <chainsawtiney using gmail.com> пишет:
>
>> RMarkdown vignettes are sometimes used to demonstrate errors and one
>> can write vignettes with `error` chunks.
>>
>> ```{r, error = TRUE}
>> stop()
>> ```
>> But now CRAN also reports the same ERRORS for mac and linux `oldrel`
>> (4.3.3).
>>
>> https://cran.r-project.org/web/checks/check_results_rio.html
> It sounds like R Markdown, when tangling a vignette into an *.R file,
> should provide additional wrapping for chunks with the error = TRUE
> option set. Would a try({ chunk content }) suffice?
>
> R CMD check relies on the tangled script not to crash, and there is
> currently no such wrapping in the generated output:
> https://github.com/cran/rio/blob/master/inst/doc/remap.R
>



More information about the R-package-devel mailing list