From josh.m.ulrich at gmail.com  Wed Dec 29 20:21:26 2010
From: josh.m.ulrich at gmail.com (Joshua Ulrich)
Date: Wed, 29 Dec 2010 13:21:26 -0600
Subject: [Rd] as.POSIXlt.factor and '...'
Message-ID: <AANLkTim++ZXSQquZ7sUOC0b1NqZqzGx3wMAPg1u2HH53@mail.gmail.com>

I noticed a difference in how as.POSIXct handled the 'format' argument
when 'x' is character versus when 'x' is a factor.  For example:

myFormat <- "%d-%m-%Y"
myDateStr <- format(Sys.Date()+1:5,myFormat)
as.POSIXct(myDateStr, format=myFormat)
as.POSIXct(factor(myDateStr), format=myFormat)

It seems to be caused by '...' not being passed in as.POSIXlt.factor.
Would it make sense to change the function to pass '...'?  I.e. from:
as.POSIXlt.factor <- function(x, ...) as.POSIXlt(as.character(x))
to:
as.POSIXlt.factor <- function(x, ...) as.POSIXlt(as.character(x), ...)

Regards,
--
Joshua Ulrich ?| ?FOSS Trading: www.fosstrading.com



[Rd] as.POSIXlt.factor and '...'
Joshua Ulrich