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

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to