user2203706
user2203706

Reputation: 27

Long documents on R Sweave include files

I'm writing a book in R Sweave, as long as the document is becoming larger I use the \include LaTeX command to include files. When I PDF-Compile the main file the files with R chunks are not included. What extension they must have .tex or .Rnw?

Upvotes: 1

Views: 254

Answers (1)

scoa
scoa

Reputation: 19867

From the Sweave User Manual, p. 7

Latex files can include others via \input{} commands. These can also be used in Sweave files, but the included files will be included by Latex and are not processed by Sweave. The equivalent if you want the included files to be processed is the \SweaveInput{} command. Included files should use the same Sweave syntax (see below) and encoding as the main file.

Upvotes: 2

Related Questions