knitr gets tricked by data.table `:=` assignment

前端 未结 5 961
不知归路
不知归路 2020-11-29 23:44

It seems that knitr doesn\'t understand that DT[, a:=1] should not result in an output of DT to the document. Is there a way to stop

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 00:20

    Just surround the expression with invisible(). This works for me.

提交回复
热议问题