Re: [R] time plotting problem

2007-11-14 Thread Jim Lemon
John Kane wrote: I clearly spoke too soon. With the actual data I am not getting sensible x-axis units. The program with the actual data below. Graph output is here: http://ca.geocities.com/jrkrideau/R/hd.png . I seem to be getting only a single entry for the x-axis of 2007.

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Excellent, that looks very nice! I had not realised that plotrix would do that and I was definately hesitating to try and figure out how to do it myself. Any idea why all I was getting was a single date on the x-axis when just doing plot? --- Jim Lemon [EMAIL PROTECTED] wrote: John Kane

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Thank you. Almost too fancy for the target user but very nice indeed. For some reason I had not thought of using ggplot2. --- hadley wickham [EMAIL PROTECTED] wrote: Here's a version using reshape and ggplot: mydata - read.table(http://ca.geocities.com/jrkrideau/R/heartdata.txt;,

Re: [R] time plotting problem

2007-11-14 Thread John Kane
Thank you Jim. That does give better results. I had not realised how complicated a question I was asking. Both yours and Jim Lemon's solutions work very nicely. I am still messing up the syntax with Gabour's approach. Thanks to all for the fast and valuable help. --- jim holtman [EMAIL

Re: [R] time plotting problem

2007-11-13 Thread John Kane
I clearly spoke too soon. With the actual data I am not getting sensible x-axis units. The program with the actual data below. Graph output is here: http://ca.geocities.com/jrkrideau/R/hd.png . I seem to be getting only a single entry for the x-axis of 2007. However dates range from First

Re: [R] time plotting problem

2007-11-13 Thread Gabor Grothendieck
You can get a slightly better X axis by converting your Date variable to chron: Replace this: plot(mydata[,1], ...) with this: library(chron) plot(chron(unclass(mydata[,1])), ...) and ignore the warning. On Nov 13, 2007 9:08 AM, John Kane [EMAIL PROTECTED] wrote: I clearly spoke

Re: [R] time plotting problem

2007-11-13 Thread hadley wickham
Here's a version using reshape and ggplot: mydata - read.table(http://ca.geocities.com/jrkrideau/R/heartdata.txt;, sep=\t, header=FALSE) mydata[,1] - as.Date(mydata[,1],%m/%d/%y) names(mydata) - c(dates, sy,dys,pulse, weight) molten - melt(mydata, m = c(sy, dys)) qplot(dates, value,

[R] time plotting problem

2007-11-12 Thread John Kane
I am completely misunderstanding how to handle dates. I want to plot a couple of data series against some dates. Simple example 1 below works fine. Unfortunately I have multiple observations per day (no time breakdowns) and observations across years. (example 2 very simplistic version ) Can

Re: [R] time plotting problem

2007-11-12 Thread jim holtman
Now your first data point is 9/26/09; is it supposed to be 9/26/06? On Nov 12, 2007 1:47 PM, John Kane [EMAIL PROTECTED] wrote: I am completely misunderstanding how to handle dates. I want to plot a couple of data series against some dates. Simple example 1 below works fine. Unfortunately I