[R] unwanted conversion of date formats in 2.3.1 to character

lorenzo.logi at hsbc.fr lorenzo.logi at hsbc.fr
Mon Aug 7 17:05:33 CEST 2006


good morning
I'm using R 2.2.1 on windows (2000/NT/XP) and trying to upgrade to 2.3.1

I am finding the curious problem of date/time data (both if stocked as date and as POSIX) that gets converted into character format whenever touched: it seems that date/time data just does not want to remain that way.

For example, a data.frame containing dates or POSIXct as row.names that is returned as result from a function arrives to the calling function with characters as row.names:
      pippo<-function(...) {
            result<-data.frame( ... )
            attributes(result)$row.names<- ... (some dates or POSIX)
            #mode(attributes(xx)$row.names) is now numeric, = date or POSIX
            return(result)
      }

      xx <- pippo(...)
      #mode(attributes(xx)$row.names) is now character !!!!

This is new to 2.3.1 (and to 2.3.0 i suppose), i.e. everything worked like a charm in 2.2.1; it looks like a bug to me (but might notbe), and I have not been able to find any reference to such a problem in the archives (which is strange,
but I might have got blind).

Any idea pls?
Thanks a lot in advance


Ensemble adoptons des gestes responsables : N'imprimez ce mail que si necessaire.

Les informations contenues dans ce message et les pieces jointes (ci-apres denomme le message) sont confidentielles et peuvent etre couvertes par le secret professionnel. Si vous n'etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez recu ce message par erreur, nous vous remercions de le supprimer de votre systeme, ainsi que toutes ses copies, et d'en avertir immediatement HSBC France et ses filiales par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur, alteration, falsification ou virus. En consequence, HSBC France et ses filiales declinent toute responsabilite du fait des erreurs, alterations, falsifications ou omissions qui pourraient en resulter.

Consider the environment before printing this mail.

The information contained in this e-mail is confidential. It...{{dropped}}



More information about the R-help mailing list