问题
I'm trying to set up eclipse to build my document following this tutorial https://yihui.name/knitr/demo/eclipse/, so I have set up eclipse accordingly
When trying to run the program I get into the following error
knit2pdf(file= "C:/workspace/p/example_scripts/test_knit2pdf.Rmd") Error in readLines(if (is.character(input2)) { : object 'input2' not found
When trying to find something about that error, I found this post which only explains that there might be a fix in markdown. https://github.com/andrewheiss/SublimeKnitr/issues/7 Could someone give me a hint on how to solve that problem ?
回答1:
You were not following the documentation https://yihui.name/knitr/demo/eclipse/. The function knitr::knit2pdf()
does not have an argument named file
. Either use input=
or just leave out the argument name (i.e. use positional arguments).
来源:https://stackoverflow.com/questions/46974613/knitr2pdf-eclipse-how-to-configure