Code
hello.Rnw:
\documentclass{article}
\begin{document}
\SweaveOpts{concordance=TRUE}
\end{document}
Commands:
rnwfile <- system.file("Sweave", "hello.Rnw", package = "utils")
Sweave(rnwfile)
Output:
Error in SweaveReadFile(file, syntax, encoding = encoding) : no Sweave file with name ‘’ found
Question
What is the problem here? Using another more complex file outputs the same. If I add to Sweave() only the path of the file it works for hello.Rnw but not for more complex files. Then the output is: "Error: ‘test.Rnw’ is not ASCII and does not declare an encoding".