i have simple r script in file test.r:
x11() plot(1,1)
from terminal, type "rscript test.r" , x11 opens , flashes plot point @ (1,1), , closes window, x11 remains open.
how keep plot open? why leave quickly?
r close device when process r dies (as when script completes). better way is:
pdf("file.pdf") plot(1,1) dev.off()
then when run through rscript save file there. otherwise, you'll have have r stay alive isn't how should run in script.
Comments
Post a Comment