.Rnw
is a file extension used for documents with latex markup and knitr and/r sweave chunks.
knitr determines the appropriate set of patterns (regular expressions) to use to extract r code and chunk options based on the file extension (if the patterns are not provided in advance). See ?knit_patterns
for more information.