This is a set of tests related to a Github issue for the sf package.

Setup

Error in rbind(deparse.level, ...) : 
  numbers of columns of arguments do not match

Loss of CRS

[1] "Component “epsg”: 'is.NA' value mismatch: 1 in current 0 in target"       
[2] "Component “proj4string”: 'is.NA' value mismatch: 1 in current 0 in target"

Unexpected Grouping

Upper-left is the original nc object.

Upper-right is the nc_aggr, which has been tranformed with summarise() which aggregates some counties together but not what I expected (also notice that the lack of CRS is visually apparent).

Lower-left is nc_grp colored by the group (nc_grp$GRP), which shows how I expected the aggregated geometries to look.

Lower-right is nc_grp overlayed by nc_aggr (notice that the white border lines do not align with the fill colors)

Geom Dropping

Notice that the southern-most county in nc_grp (lime green) is dropped from nc_aggr (grey)

LS0tCnRpdGxlOiAic3Agw5cgdGlkeXZlcnNlIHRlc3QiCmF1dGhvcjogVGllcm5hbiBNYXJ0aW4Kb3V0cHV0OiBodG1sX25vdGVib29rCmRhdGU6IE5vdmVtYmVyIDAyLCAyMDE2Ci0tLQoKVGhpcyBpcyBhIHNldCBvZiB0ZXN0cyByZWxhdGVkIHRvIGEgW0dpdGh1YiBpc3N1ZV0oaHR0cHM6Ly9naXRodWIuY29tL2VkemVyL3Nmci9pc3N1ZXMvNDIpIGZvciB0aGUgYHNmYCBwYWNrYWdlLiAKCiMjIyMgU2V0dXAKYGBge3Igc2V0dXB9CmxpYnJhcnkoZHBseXIpCmxpYnJhcnkoc2YpCmxpYnJhcnkoUkNvbG9yQnJld2VyKQoKZGVtbyhuYywgYXNrID0gRkFMU0UsIGVjaG8gPSBGQUxTRSkKCm5jX2dycCA8LSAKICAgICAgICBuYyAlPiUgIAogICAgICAgIG11dGF0ZShHUlAgPSBudGlsZShCSVI3NCw0KSkKCm5jX2FnZ3IgPC0gCiAgICAgICAgbmNfZ3JwICU+JSAKICAgICAgICBncm91cF9ieShHUlApICU+JSAKICAgICAgICBzdW1tYXJpc2VfYWxsKGZpcnN0KQoKIyBUaGlzIHdvcmtzLCBidXQgSSdtIGhhdmluZyB0cm91YmxlI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