%cat stock.R
#! /usr/local/bin/Rscript

args <- commandArgs(TRUE)
args

x <- read.csv("000301.csv")
matplot(x[,1],x[,-1],type="l")
#q(save="no")

%Rscript stock.R 000301.csv
[1] "000301.csv"
matplot doesnot draw anything(no drawing window).

Howeve, in R, source works great!
>source("stock.R")

Sincerely!

-- 
View this message in context: 
http://n4.nabble.com/Why-doesnot-Rscript-work-tp963418p963418.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to