Open TSchiefer opened 5 years ago
Just following up on this with what seems to be a related issue.
scan_data
does not appear to work on sf data
Data on bus_stops downloaded from https://data.a2gov.org/feeds/GIS/AATA%20BusStops/AATA_Bus_Stops.shp.xml
It just appears to stop with
Error in sum(as.vector(t(collected))) : invalid 'type' (list) of argument
Example code (and error) below
R> library(sf) Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1 R> bus_data <- sf::st_read('~/Downloads/AATABusStops/AATABusStops.shp') Reading layer
AATABusStops' from data source
/Users/peterhiggins/Downloads/AATABusStops/AATABusStops.shp' using driver
ESRI Shapefile'
Simple feature collection with 1616 features and 12 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: -84.02867 ymin: 42.21356 xmax: -83.48754 ymax: 42.32714
Geodetic CRS: NAD83
R> pointblank::scan_data(bus_data)
── Data Scan started. Processing 6 sections. ─── ℹ Starting assembly of 'Overview' section... Error in sum(as.vector(t(collected))) : invalid 'type' (list) of argument R> class(bus_data) [1] "sf" "data.frame"`
I intended to check key-properties of
sf(c)
-objects making use ofrows_not_duplicated()
. The check was supposed to ignore the geometry column of the object (cf. 2nd example in reprex).It seems that
interrogate()
ran into an error, because of the way,summarize()
works on these objects.Reprex example:
Created on 2019-02-12 by the reprex package (v0.2.1)
I think it happens at the following chunk in
interrogate()
in the section "# Judge tables on expectation of non-duplicated rows":My expectation would be, that
rows_not_duplicated()
, without specifying columns) each whole row, including the geometry column, would be compared with the others.rows_not_duplicated(cols = vector)
) the check would be done only for the column "vector".Perhaps a solution might be to call
as_tibble()
beforegroup_by()
andsummarize()
?CC: @krlmlr