[R] problem on plotting ts data

2012-01-04 Thread lornyi
Hi, i try to plot ts data on x-y coordiante
I want my data to be points, but somehow it always comes out with lines and
# linked bwtween data,
i used  plot(lag(x,-9),y,type=p), x and y are time series data
is there anyway to remove those lines?
Thanks a lot

--
View this message in context: 
http://r.789695.n4.nabble.com/problem-on-plotting-ts-data-tp4261865p4261865.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.


Re: [R] problem on plotting ts data

2012-01-04 Thread lornyi
thanks, it works!

--
View this message in context: 
http://r.789695.n4.nabble.com/problem-on-plotting-ts-data-tp4261865p4262179.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.


Re: [R] problem on plotting ts data

2012-01-04 Thread Rui Barradas
Hello,

Try 'as.vector' or 'as.numeric'

x - as.ts(rnorm(20))
y - as.ts(rnorm(20))
plot(x)

plot(as.vector(lag(x,-9)),as.vector(y),type=p) # works
plot(as.numeric(lag(x,-9)),as.numeric(y),type=p)  # also works

Rui Barradas



--
View this message in context: 
http://r.789695.n4.nabble.com/problem-on-plotting-ts-data-tp4261865p4262106.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.