\documentclass[a4paper,11pt]{article}

\usepackage{Sweave}
\begin{document}
\title{An simple Sweave document}
\maketitle

Some R code:
\begin{Schunk}
\begin{Sinput}
> d <- data.frame(a = 1:10, b = "xxx")
> print(d$a)
\end{Sinput}
\begin{Soutput}
 [1]  1  2  3  4  5  6  7  8  9 10
\end{Soutput}
\begin{Sinput}
> print(d$b)
\end{Sinput}
\begin{Soutput}
 [1] xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
Levels: xxx
\end{Soutput}
\end{Schunk}

Dataframe has 10 rows. In the last row, column a is 
10 and column b is xxx.

\end{document}

