I did look in here: http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Programming
Wikipedia shows how to write an on the fly R program: http://en.wikipedia.org/wiki/Hello_w
You could also try:
Rscript mow.R
to get output on the console.