I'm trying to prepare my package for CRAN, and running devtools check.
One of my vigentte met error:
checking re-building of vignette outputs ... WARNING
Error(s) in re-building vignettes:
--- re-building 'package_usage.Rmd' using rmarkdown
Quitting from lines 177-180 (package_usage.Rmd)
Error: processing vignette 'package_usage.Rmd' failed with diagnostics:
All items in j=list(...) should be atomic vectors or lists. If you are trying something like j=list(.SD,newcol=mean(colA)) then use := by group instead (much quicker), or cbind or merge afterwards.
--- failed re-building 'package_usage.Rmd'
However the vignette itself can be knitted without any problem, and the function caused error has been used in my package for a long time without any problem.
I tried to reproduce the error but cannot find how to do it. It looks like devtools used some specific mode to run the code...
Some internet search mentioned to use rmarkdown::render as vignette engine, but I tried to use it then vigenette cannot be built.
How can I reproduce the error reported?