[R] Strage result with an append/strptime combination

Ptit_Bleu ptit_bleu at yahoo.fr
Wed Aug 29 14:13:30 CEST 2007


Hi,

I keep on trying to write some small scripts in order to learn R but even
with basic scripts I have problems ...

I start with the name of a file which is in fact the time the file has been
generated (I cannot change the format). Then I convert namefile with
strptime. The problem occurs when I add another time from another file with
append. It displays some informations I don't want.

I found a post about this problem
(http://www.nabble.com/Error-with-strptime-tf3607942.html#a10081942) but I
don't understand the solution. I tested as.POSIXct or as.POSIX.lt but it has
no effect.

Do you have some ideas to solve this problem ?
Thank you for your help.
Ptit Bleu.

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

>namefile<-"070707050642.dat"    #day-month-year-hour-minute-second.dat
>jourheure<-strptime(namefile,"%d%m%y%H%M%S")

> jourheure
[1] "2007-07-07 05:06:42"

>jourheure<-append(jourheure,jourheure)
> jourheure
[1] "2007-07-07 05:06:42 Paris, Madrid (heure d'été)" "2007-07-07 05:06:42
Paris, Madrid (heure d'été)"

-- 
View this message in context: http://www.nabble.com/Strage-result-with-an-append-strptime-combination-tf4347401.html#a12385852
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list