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_world_program_examples#R_2
But how to execute this from a file?
What extension needs to be given?
How to compile the file then?
on Linux.
I created a file mow.R containing the following code:
cat ('Hello world!')
R says:
> source mow.R
Error: unexpected symbol in "source mow.R"