I keep R and Rnw files separate, then load the R data/plots with load(\"file.R\") in the first Sweave chunk. Is there a way that I can print the sourced R file
load(\"file.R\")
How about using a Latex package? Add into your header \usepackage{fancyvrb} Then \VerbatimInput{yourRfile.R}