% Hints for those not versed in LaTeX are at % http://biostat.mc.vanderbilt.edu/LaTeXCollab \documentclass{article} \usepackage{spaper} % Define particular comment commands for each author so as to automatically % include name/initials \newcommand{\comfh}[1]{\com{FH}{#1}} \newcommand{\comfp}[1]{\com{FP}{#1}} % To cause all comments and marginal notes to be suppressed, % uncomment the following line %\ignorecom \addbibresource{/home/harrelfe/bib/harrelfe.bib} \renewcommand{\cite}[1]{\supercite{#1}} % make citations use superscripts \title{Example Report} \author{Frank Harrell\thanks{Department of Biostatistics, Vanderbilt University School of Medicine, \texttt{f.harrell@vanderbilt.edu}} \and Fictitious Person\thanks{Department of Irreproducible Research, Slapout College, \texttt{fp@sloppy.com}}} \date{\today} \begin{document} \maketitle \tableofcontents <>= require(rms) knitrSet(echo=TRUE) # set echo=FALSE to not print code lan <- function(a, ...) latex(a, file='', table.env=FALSE, ...) @ \section{Descriptive Statistics} <>= getHdata(FEV) latex(describe(FEV), file='') @ \comfh{I have a question about the data. Do all the values make sense? Are these data applicable to our research question? Did we really land a man on the moon?} \comfp{No, I don't think we landed a man on the moon, but I do think that hundreds of aliens from an advanced civilization visited us in the 1950s and forgot to say hello.} \comfh{I'm convinced} \section{FEV vs.\ Age} Figure~\ref{fig:plot} shows the raw data for some of the key variables. <>= ggplot(FEV, aes(x=age, y=fev, color=sex)) + geom_point() @ \comfh{\textbf{TO DO}: \begin{enumerate} \item See if other variables need to be accounted for \item See if age and sex interact \end{enumerate}} \section{Computing Environment} These analyses were done using the following versions of R\cite{Rsystem}, the \snote{CHECK} operating system, and add-on packages \code{Hmisc}\cite{Hmisc}, \code{rms}\cite{rrms}, and others: <>= toLatex(sessionInfo(), locale=FALSE) @ The reproducible research framework \code{knitr}~\cite{knitr} was used. \printbibliography[title={Bibliography}] % To print all code in an appendix if you used knitrSet(echo=FALSE), % use the following \appendix \section{\R\ Code} <>= @ \end{document} To update wiki: cp -p spaper.* /tmp browser http://biostat.mc.vanderbilt.edu/wiki/bin/attach/Main/LaTeXCollab?filename=spaper.sty;revInfo=1 browser http://biostat.mc.vanderbilt.edu/wiki/bin/attach/Main/LaTeXCollab?filename=spaper.Rnw;revInfo=1