From c915f72f8d40066fc35efb509b02faa855fb67d4 Mon Sep 17 00:00:00 2001 From: Andy Teucher Date: Tue, 25 Sep 2018 12:23:18 -0700 Subject: [PATCH] Use as.data.frame so handle_dates doesn't try to convert geom column --- R/geojson_sf.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/geojson_sf.R b/R/geojson_sf.R index 3a62114..00e0001 100644 --- a/R/geojson_sf.R +++ b/R/geojson_sf.R @@ -152,7 +152,7 @@ date_columns <- function( sf ) names(which(vapply(sf , function(x) { inherits(x, handle_dates <- function( x ) { dte <- date_columns( x ) - x[dte] <- lapply(x[dte], as.character) + x[dte] <- lapply(as.data.frame(x)[dte], as.character) return( x ) }