Error compiling Rnw to tex

浪尽此生 提交于 2019-12-12 05:19:51

问题


I had a problem using function Sweave. It seemed to be an encoding problem because I did not specify any encoding like: \usepackage[latin1]{inputenc}.

Now using button "Compile PDF" works -> PDF is generated and everythink is OK. But I'm getting 30 warnings and 18 badboxes.

Using function Sweave to generate first the tex file fails with this message:

Error:  chunk 4 (label = t4)
Error in file(con, "w") : cannot open the connection
In addition: There were 31 warnings (use warnings() to see them)

So one warning more than before.

Do you have any idea?


回答1:


The problem was created by using .. for the paths setted by the R code. Using complete path with "C:\Users\test\" instead of "..\test\" solved the problem. So the code from folder "test" couldnt be loaded because the Sweave-Function used other paths (like WORKING DIRECTORY).



来源:https://stackoverflow.com/questions/35603194/error-compiling-rnw-to-tex

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!