Re: [R] Time format

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

Hi Patrick,

pm509_at_york.ac.uk 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))
plot(myts)
title(main="Whole Timeseries")
plot(myts, xlim=c(1970,2000))
title(main="Limited X-Axis")

Hope this helps,
Roland



R-help_at_stat.math.ethz.ch 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. 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.