Hi all- terribly beginner question here, but I can't figure out how to put
dates as the values for my x range in a plot. Example:
xrange <- results$current
yrange <- results$DIFF

plot(xrange, yrange, type="n", xlab="Date", ylab="Differential")
lines(results$DIFF, type="l", lwd=1.5, col="red")

Where xrange is:

> xrange
 [1] "2010-04-12" "2010-04-14" "2010-04-15" "2010-04-16" "2010-04-17"
"2010-04-18" "2010-04-19" "2010-04-20" "2010-04-21" "2010-04-23"
"2010-04-24" "2010-04-25"
[13] "2010-04-27" "2010-04-28" "2010-04-29" "2010-04-30" "2010-05-01"
"2010-05-02" "2010-05-03" "2010-05-04" "2010-05-05" "2010-05-06"
"2010-05-07" "2010-05-08"
[25] "2010-05-09" "2010-05-10" "2010-05-11" "2010-05-12" "2010-05-13"
"2010-05-14" "2010-05-15" "2010-05-16" "2010-05-18" "2010-05-19"
"2010-05-20" "2010-05-21"
[37] "2010-05-22" "2010-05-23" "2010-05-25" "2010-05-26" "2010-05-27"
"2010-05-28" "2010-05-29" "2010-05-30" "2010-05-31" "2010-06-01"
"2010-06-02" "2010-06-04"
[49] "2010-06-05" "2010-06-06" "2010-06-08" "2010-06-09" "2010-06-10"
"2010-06-11" "2010-06-12" "2010-06-13" "2010-06-14" "2010-06-15"
"2010-06-16" "2010-06-17"
[61] "2010-06-18" "2010-06-19"

The error being:

> plot(xrange, yrange, type="n", xlab="Date", ylab="Differential")
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf

Any tips on how to generate a nicely-formatted plot w/ dates in the x axis?
Thanks.

-- 
Wells Oliver
wells@submute.net

	[[alternative HTML version deleted]]


