\documentclass{article} \SweaveOpts{engine=R,eps=FALSE,pdf=TRUE,strip.white=true,keep.source=TRUE} \usepackage{Sweave} \begin{document} <>= options(width=70, useFancyQuotes = FALSE, prompt="R> ", continue="+ ") @ \subsection*{Introduction} We generate 3D gaussian data, <>= set.seed(1) n <- 100 x <- rnorm(n); y <- 2*x + rnorm(n)/2 U3 <- cbind(x, y, z = -3*x + y + rnorm(n)/4) @ look at its structure <>= str(U3) # its structure ((comment kept)) @ and load package \texttt{lattice} <>= require("lattice") @ to visualize it by a simple scatter plot matrix \begin{figure}[h!] \centering <>= splom(U3, xlab ="", cex = 0.4) <>= print( <> ) @ \caption{\Sexpr{n} vectors of random variates ... ...} \label{fig:AC_Joe} \end{figure} \subsection*{Session Information} <>= toLatex(sessionInfo()) @ \end{document}