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

Jisca huisman j|@c@@hu|@m@n @end|ng |rom gm@||@com
Fri Jun 7 17:21:57 CEST 2024


Hi Ivan,

In my experience, if you add purl=FALSE to those chunks, it will pass the
checks. This was the default but changed/ is the default on some platforms
not others when you have error=TRUE (don't recall details).

Jisca


On Fri, 7 Jun 2024, 16:05 Tim Taylor, <tim.taylor using hiddenelephants.co.uk>
wrote:

> 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
> >
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list