e.g. dat
[,1]dat[,2]
[1,]300 20060101
[2,]257 20060102
[3,]320 20060103
[4,]311 20060104
[5,]297
]
To: r-help@stat.math.ethz.ch
Subject:[R] plot(): I want to display dates on X-axis.
Hi,
I want to display dates on my x-axis of the plot. I was trying to use
plot() command for the same and passing the values in following
manner:
The variable dat is a data frame
Sarthi M. wrote:
I want to display dates on my x-axis of the plot.
Dates are a problem. There's a standard for dates, but it
seems that most users and software didn't catch up :-/
The variable dat is a data frame. The first column has numeric
values and second column has date.
e.g. dat
You can also do it with the following:
plot(as.POSIXct(strptime(as.character(dat[,2]), %Y%m%d)), dat[,1])
On 3/5/07, d. sarthi maheshwari [EMAIL PROTECTED] wrote:
Hi,
I want to display dates on my x-axis of the plot. I was trying to use
plot()
command for the same and passing the values
Hi,
I want to display dates on my x-axis of the plot. I was trying to use plot()
command for the same and passing the values in following manner:
The variable dat is a data frame. The first column has numeric values and
second column has date.
e.g. dat
[,1]