Running R Scripts with Plots
If you use the Rscript command (which is better suited for this purpose), you run it like this:
#!/usr/bin/Rscriptdaq = read.table(file('mydata.dat'))X11()pairs(daq)message("Press Return To Continue")invisible(readLines("stdin", n=1))
Make sure to set the execute permission on myscript.r, then run like:
/path/to/myscript.r
or without the shebang:
Rscript /path/to/myscript.r