[R-sig-Geo] writeOGR() to shapefile and dates/times classes
Roger Bivand
Roger.Bivand at nhh.no
Sun Jun 24 14:46:28 CEST 2012
On Sun, 24 Jun 2012, Agustin Lobo wrote:
> writeOGR() issues an error if the Spatial Points/Polygon Dataframe
> has any variables of classes dates or times. While I understand that
> this is rather a problem of using a bad format (shapefile) that does not accept
> these kind of variables, I suggest
> the developer could consider that the necessary conversion to character
> were done automatically by writeOGR() and just issue a warning message
> instead of an error.
Please provide a reproducible example, and sessionInfo() output.
The function already converts the standard date and time classes POSIXct,
POSIXlt, Date and POSIXt to character. If the user chooses a non-base
date-time representation, arguably the user should then convert to a base
class first, otherwise rgdal would depend on zoo, xts, lubridate or
whatever.
Roger
>
> Thanks!
>
> Agus
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list