在原始代码中找到knitr data.table警告消息的来源

时间:2014-12-03 20:22:41

标签: r data.table rstudio knitr

我想找到在RStudio中编译knitr PDF时生成警告消息的特定块(或更好的代码行)。这是knitr在成功运行每个块后输出的最后一条信息:

.....
output file: file.tex

[1] "file.tex"
Warning message:
In bmerge(i, x, leftcols, rightcols, io <- FALSE, xo, roll = 0,  :
  A known encoding (latin1 or UTF-8) was detected in a join column. data.table compares the 
bytes currently, so doesn't support *mixed* encodings well; i.e., using both latin1 and UTF-8, 
or if any unknown encodings are non-ascii and some of those are marked known and others not. 
But if either latin1 or UTF-8 is used exclusively, and all unknown encodings are ascii, then 
the result should be ok. In future we will check for you and avoid this warning if everything 
is ok. The tricky part is doing this without impacting performance for ascii-only cases.
Running xelatex on file.tex...completed

Created PDF: ~/Documents/file.pdf

为什么警告不会与生成它的块一起显示?为了找到它的来源,我尝试启用opts_chunk$set(warning=TRUE, message=TRUE, echo=TRUE,但警告消息未显示在最终的PDF中。我也单独介绍了很多块,并且似乎没有在R控制台中收到此警告(事实上我只使用一个merge()by=是一个整数)。跟踪它的任何其他建议?我正在运行最新的CRAN版本的knitr 1.8和data.table 1.94,以及RStudio 0.98.1091。

0 个答案:

没有答案