Resolution is to run with Rscript, and not with R. Examples elsewhere (e.g. How can I read command line parameters from an R script?), run scripts from the command line with
R --args args1 args2... < foo.R
running with
Rscript foo.R args1 args2 ...
produces only the output, and not the script. It's also a much cleaner way to run scripts.