%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")
Si
%cat test.csv
No,HS,ZangF,ZenF
1,0.25,0.5,0.57
2,0.10,0.23,0.12
3,0.20,0.25,0.1
..
d <- read.csv("000301.txt")
matplot(d[,1], d[,-1], type='l')
It works. However, i hope the legend is displayed.
Sincerely!
z_axis wrote:
>
> It works ! thank you very much.
> 2 0.11 0.56 0.12"), header=TRUE)
> matplot(x[,1], x[,-1], type='l')
>
>
> On Fri, Dec 11, 2009 at 3:39 AM, z_axis wrote:
>
>>
>> thanks for your answer ! Would you mind giving me an example using my
>> data
>> ?
>>
>>
thanks for your answer ! Would you mind giving me an example using my data ?
Sincerely!
Patrick Connolly-4 wrote:
>
> On Thu, 10-Dec-2009 at 10:14PM -0800, z_axis wrote:
>
> |>
> |> The following is sampling data:
> |> No V1 V2 V3
> |> 1 0.23 0.
The following is sampling data:
No V1 V2 V3
1 0.23 0.12 0.89
2 0.11 0;56 0.12
...
I just want to draw three lines on same picture according to value of V1, V2
and V3.
I am a R newbie, so any suggestion is appreciated !
--
View this message in context:
http://n4.nabble.com/How
5 matches
Mail list logo