Hello,
i would like to insert R code in LaTeX document.
I see something about the 'listings' package, but i would like if it is the
best way and if it is possible to use the command \include{programme.R}.
I have the following solution but it doesn't work with \include and \input

======
LaTex
======

main.tex
------------------
\documentclass{report}
\usepackage{listings}
\lstloadlanguages{R}

\begin{document}
\include{annexe}
\end{document}

annexe.tex
---------------
The code is:
\lstset{language=R}

#\include{} or  \input or direct code ???

R code
========
# test
rm(list=ls())
x<-1:10
mean(x)

	[[alternative HTML version deleted]]

