Skip to content
Prev 40195 / 398500 Next

HMisc describe -- error with dates

On Tue, 11 Nov 2003 20:40:50 -0500 (EST)
"Gabor Grothendieck" <ggrothendieck at myway.com> wrote:

            
I like POSIX but chron should be workable.  The fix for isChron in Hmisc
is:

function(x) {
  cl <- class(x)
  dc <- if(.R.) c('POSIXt','POSIXct','dates','times','chron') else
                c('timeDate','date','dates','times','chron')
  length(cl) && any(cl %in% dc)
}

But describe also runs this command:

  if(isdatetime) notime <- all(format(x.unique,"%H%M%S")=='000000')

and such calls to format for chron objects (which actually calls
format.dates if x.unique is a dates object) do not work.  So a few more
modifications will need to be made in describe to work with chron objects,
when time allows.

Frank
---
Frank E Harrell Jr    Professor and Chair            School of Medicine
                      Department of Biostatistics    Vanderbilt University