summaryrefslogtreecommitdiff
path: root/info/formation-latex-ul/source/sweave-diapos.tex
diff options
context:
space:
mode:
Diffstat (limited to 'info/formation-latex-ul/source/sweave-diapos.tex')
-rw-r--r--info/formation-latex-ul/source/sweave-diapos.tex63
1 files changed, 63 insertions, 0 deletions
diff --git a/info/formation-latex-ul/source/sweave-diapos.tex b/info/formation-latex-ul/source/sweave-diapos.tex
new file mode 100644
index 0000000000..a18245ae26
--- /dev/null
+++ b/info/formation-latex-ul/source/sweave-diapos.tex
@@ -0,0 +1,63 @@
+%%% Copyright (C) 2018 Vincent Goulet
+%%%
+%%% Ce fichier fait partie du projet
+%%% «Rédaction avec LaTeX»
+%%% https://gitlab.com/vigou3/formation-latex-ul
+%%%
+%%% Cette création est mise à disposition sous licence
+%%% Attribution-Partage dans les mêmes conditions 4.0
+%%% International de Creative Commons.
+%%% https://creativecommons.org/licenses/by-sa/4.0/
+
+\section{Programmation lettrée}
+
+\begin{frame}[fragile=singleslide]
+ \frametitle{Document source combinant {\LaTeX} et code R}
+
+ \fichier{fichier.Rnw}
+\begin{lstlisting}[emph={Sexpr}]
+...
+
+L'utilisateur de R interagit avec l'interprète en entrant
+des commandes à l'invite de commande:
+<<echo=TRUE>>=
+2 + 3
+@
+La commande \verb=exp(1)= donne \Sexpr{exp(1)},
+la valeur du nombre $e$.
+
+...
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile=singleslide]
+ \frametitle{Après traitement par Sweave dans R}
+
+ \texttt{Sweave("fichier.Rnw")}
+ $\rightarrow$ \fichier{fichier.tex}
+\begin{lstlisting}[emph={Schunk,Sinput,Soutput}]
+...
+
+L'utilisateur de R interagit avec l'interprète en entrant
+des commandes à l'invite de commande:
+\begin{Schunk}
+\begin{Sinput}
+> 2 + 3
+\end{Sinput}
+\begin{Soutput}
+[1] 5
+\end{Soutput}
+\end{Schunk}
+La commande \verb=exp(1)= donne 2.71828182845905,
+la valeur du nombre $e$.
+
+...
+\end{lstlisting}
+
+\end{frame}
+
+%%% Local Variables:
+%%% TeX-master: "formation-latex-ul-diapos"
+%%% TeX-engine: xetex
+%%% coding: utf-8
+%%% End: