Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a slightly safer way of comparing column values to "{ }" and adds a
curly_brace_na.data.frame
method that only compares character and factor columns.The primary motivation was to enable round-tripping with Date and POSIXct columns, which error currently (5a293b0):
I had to remove the Date metadata here in order to run
ms_simplify
, as a real world example:https://github.com/mdsumner/ozplot/blame/master/README.Rmd#L100
I kind of remember discussing this at some point, so apologies if I've missed something! I think there will be other details and perhaps problematic and column types, but I feel like this is a reasonable PR without being comprehensive yet. :)
There's a further problem in that date-time types don't always(?) round-trip completely, and I assume that's a time zone thing - but it wouldn't have been noticed. I'll wait until this is accepted before pursuing those details, for now I've left out the round-trip test, commented out here:
https://github.com/ateucher/rmapshaper/pull/68/files#diff-792448277e53b51a3b944f1b1873e7f8R515