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.
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
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;,
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
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
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
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,
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
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
9 matches
Mail list logo