Skip to content

Commit

Permalink
Use as.data.frame so handle_dates doesn't try to convert geom column
Browse files Browse the repository at this point in the history
  • Loading branch information
ateucher committed Sep 25, 2018
1 parent c418bb0 commit c915f72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/geojson_sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
}

Expand Down

0 comments on commit c915f72

Please sign in to comment.