\documentclass[11pt]{article} \begin{document} \section{Introduction} <>= time <- format(Sys.time(), "%a %b %d %X %Y") rand <- rnorm(1) @ The current time is \Sexpr{time}. My favorite random number is \Sexpr{rand}. \end{document}