How do I retain "POSIXct" formatting when using apply, with FUN=max?
   
  #example:
  mydata <- rep(Sys.time(), 10)
mydf <- data.frame(matrix(data=mydata, nrow=2, ncol=length(mydata) ) )
for(i in seq(mydf))class(mydf[[i]]) <- class(mydata)
str(mydf)
maxdates <- apply(mydf,2,max,na.rm=T)
str(maxdates)
   
  #Why is the formattign now "chr", and not "POSIXct"? 
  #Is there a good way to retin "POSIXct" formatting?
   

       
---------------------------------

	[[alternative HTML version deleted]]


