Re: [R-sig-Geo] POSIX* objects and writeOGR()

2010-01-01 Thread Roger Bivand
On Thu, 31 Dec 2009, Agustin Lobo wrote: Thanks! I see that creating a temporary SPDF with that variable casted as character is the only way to run writeOGR(). Would it be possible adding an option i.e. POSIXtoCHAR=T to writeOGR() so that such a conversion is automated? POSIXt *is* converted

Re: [R-sig-Geo] POSIX* objects and writeOGR()

2009-12-31 Thread Agustin Lobo
Thanks! I see that creating a temporary SPDF with that variable casted as character is the only way to run writeOGR(). Would it be possible adding an option i.e. POSIXtoCHAR=T to writeOGR() so that such a conversion is automated? Agus Michael Sumner wrote: POSIXlt stores the date-times as a l

Re: [R-sig-Geo] POSIX* objects and writeOGR()

2009-12-30 Thread Michael Sumner
POSIXlt stores the date-times as a list of vectors decomposed into the (still numeric) component parts ("sec", "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst") so that cannot be stored as a single column in the data frame - you would need 9 columns. Compare these to see the underlyi

[R-sig-Geo] POSIX* objects and writeOGR()

2009-12-30 Thread Agustin Lobo
This might be a bit off-topic. I have to export as shape an Sp.Poly.DF in which one of the variables records date and time as POSIXtc. As writeOGR() complains about the POSIXct variable, I'm trying to convert to POSIXlt, which I think that will be accepted (another alternative would be coverting t