s-news
[Top] [All Lists]

Splus6 Trouble Plotting Dates

To: s-news@lists.biostat.wustl.edu
Subject: Splus6 Trouble Plotting Dates
From: HaighR@pac.dfo-mpo.gc.ca
Date: Tue, 27 Nov 2001 16:54:51 -0500
Splus version = 6.0 Professional, Release 2.
Operating system = Win NT4, Service Pack 6.

Problem:
I routinely convert all my date objects to chron objects with an origin of
Jan 1, 1900. Up till using Splus 6 I had no trouble plotting values y vs.
time x (chron values). Now when I pass  the chron values to lines or points,
the values are interpreted as dates with the default origin Jan 1, 1960, and
subsequently fall outside the bounds of my plot. This occurs even though
as.numeric(x) returns a number that obviously lies within the plot and has
an origin of Jan 1, 1900. I could simply plot (as.numeric(x),y) but this is
just a fiddle.

Does anyone know if this is a bug in the plotting routines (plot, lines,
points) or have I missed something?
I have tried setting options as follows,

        library(chron)
        options(chron.origin = c(month = 1., day = 1., year = 1900.))
        options(time.century = 1900, time.origin = c(month = 1., day = 1.,
year = 1900.))

but this makes no difference. Suggestions would be greatly appreciated.
Thanks.

Rowan Haigh
Fisheries and Oceans Canada
Groundfish Stock Assessment
Pacific Biological Station
Nanaimo BC V9R 5K6
Tel (250) 756-7123
Fax (250) 756-7053
[mailto:haighr@pac.dfo-mpo.gc.ca]


<Prev in Thread] Current Thread [Next in Thread>
  • Splus6 Trouble Plotting Dates, HaighR <=