Re: [R] Time format

From: Roland Rau <>
Date: Fri, 01 Jun 2007 14:28:22 -0400

Hi Patrick, wrote:
> Dear R-help list members,
> I am new to R, and having problems with plotting part of a time series. I
> have read in my data using read.table, and my 'time' column is recognised
> as a numeric variable. When I convert this to a time format, I am no longer
> able to use its values on my x-axis. The problem is that I only want part
> of the time series to appear on the plot, ignoring the first 23
> measurements.
> I would be very grateful if someone could suggest a way of solving this.
Does my following example code help? I just reduce the limits on the x-axis.

myts <- ts(runif(480), frequency=12, start=c(1960,1)) par(mfrow=c(1,2))
title(main="Whole Timeseries")
plot(myts, xlim=c(1970,2000))
title(main="Limited X-Axis")

Hope this helps,
Roland mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Fri 01 Jun 2007 - 18:44:24 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 01 Jun 2007 - 19:31:34 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.