Thank you, Bill (and Chuck Taylor). I probably had an appropriate
default in.format that I was unaware of, which the crash event messed up
(previously I never needed to specify the in.format). Apologies for fast
scrolling in the class.timeDate help screen, I completely missed the
existence of separate in and out formats, used out for both.
I'm hoping this puts me back on track without having to re-install S.
Still interested in knowing if anyone has encountered the problem of S
crashing if R is started first.
> Mark Fowler
Population Ecology Division
> Bedford Inst of Oceanography
> Dept Fisheries & Oceans
> Dartmouth NS Canada
B2Y 4A2
Tel. (902) 426-3529
Fax (902) 426-9710
Email fowlerm@mar.dfo-mpo.gc.ca
Home Tel. (902) 461-0708
Home Email mark.fowler@ns.sympatico.ca
-----Original Message-----
From: Bill Dunlap [mailto:bill@insightful.com]
Sent: June 16, 2008 12:29 PM
To: Fowler, Mark
Subject: Re: [S] S corrupted?
On Mon, 16 Jun 2008, Fowler, Mark wrote:
> #Fine.
> > date()
> [1] "Mon Jun 16 10:49:36 ADT 2008"
>
> #Expecting date output.
> > timeDate()
> timeDate()
> > timeDate(date())
> [1] NA
> > timeDate(date(),in.format="%a %b %d %H:%M:%S %Z %Y")
> [1] NA
> > timeDate(date(),in.format="%a %b %d %H:%M:%S %Z %Y",format="%Y %M
> > %d")
> [1] NA
In Splus I don't think %a and %b mean anything in an in.format for
timeDate(). They are meaningful as output formats. For in.format use
%3c to skip the 3 character day-of-the-week name and %m to capture the
month:
> print(z<-date())
[1] "Mon Jun 16 08:22:43 PDT 2008"
> timeDate(z, in.format="%3c %m %d %H:%M:%S %Z %Y",format="%Y-%M-%d
%H:%M %Z")
[1] 2008-22-16 15:22 GMT
> timeDate(z, in.format="%3c %m %d %H:%M:%S %Z %Y",format="%Y-%M-%d
%H:%M %Z", zone="ADT")
[1] 2008-22-16 12:22 ADT
------------------------------------------------------------------------
----
Bill Dunlap
Insightful Corporation
bill at insightful dot com
360-428-8146
"All statements in this message represent the opinions of the author
and do not necessarily reflect Insightful Corporation policy or
position."
|