In LaTeX captions can be used within float environments like figures or tables.
So if your R output is e.g. a figure you can enclose it in a figure environment:
\begin{figure}
<<fig=TRUE, echo=FALSE, eps=TRUE>>=
data(iris)
boxplot(iris[,2]~iris[,5])
@
\caption{A boxplot of the famous Fisher data set.}
\end{figure}
If you want your R-Code as a float environment (with the possibility to use \caption) you will have to define your own float environment. Have a look at LaTeX WikiBook. Something like the following will do it:
In your document preamble:
\usepackage{float}
\newfloat{rcode}{h!t}{rcode}
\floatname{rcode}{Code Example}
Then in your document body:
\begin{rcode}
<<echo=true>>=
x<-5
y<-x+5
@
\caption{This code shows something.}
\end{rcode}