CRAN Package Check Results for Package sf

Last updated on 2017-06-22 21:48:31.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.5-0 56.92 71.36 128.29 ERROR
r-devel-linux-x86_64-debian-gcc 0.5-0 60.82 72.23 133.05 ERROR
r-devel-linux-x86_64-fedora-gcc 0.5-0 320.56 ERROR
r-devel-windows-ix86+x86_64 0.5-0 296.00 479.00 775.00 ERROR
r-patched-linux-x86_64 0.5-0 52.29 69.02 121.31 ERROR
r-patched-solaris-sparc 0.5-0 1552.90 NOTE
r-patched-solaris-x86 0.5-0 319.30 ERROR
r-release-linux-x86_64 0.5-0 51.69 69.71 121.40 ERROR
r-release-windows-ix86+x86_64 0.5-0 253.00 532.00 785.00 ERROR
r-release-osx-x86_64 0.5-0 ERROR
r-oldrel-windows-ix86+x86_64 0.5-0 263.00 513.00 776.00 NOTE
r-oldrel-osx-x86_64 0.5-0 NOTE

Additional issues

valgrind

Check Details

Version: 0.5-0
Check: tests
Result: ERROR
     Running ‘cast.R’ [1s/1s]
     Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ...4c4
    < Linking to GEOS 3.5.1, GDAL 2.1.2, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running ‘crs.R’ [1s/1s]
     Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ... OK
     Running ‘dist.R’ [1s/1s]
     Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ... OK
     Running ‘dplyr.R’ [3s/3s]
    Running the tests in ‘tests/dplyr.R’ failed.
    Complete output:
     > suppressPackageStartupMessages(library(sf))
     > library(dplyr)
    
     Attaching package: 'dplyr'
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
     > nc %>% filter(AREA > .1) %>% plot()
     Warning message:
     plotting the first 10 out of 14 attributes; use max.plot = 14 to plot all
     >
     > # plot 10 smallest counties in grey:
     > nc %>%
     + select(BIR74, geometry) %>%
     + plot()
     >
     > nc %>%
     + select(AREA, geometry) %>%
     + arrange(AREA) %>%
     + slice(1:10) %>%
     + plot(add = TRUE, col = 'grey', main ="")
     >
     > # select: check both when geometry is part of the selection, and when not:
     > nc %>% select(SID74, SID79) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79, geometry) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79) %>% class()
     [1] "sf" "data.frame"
     > nc %>% select(SID74, SID79, geometry) %>% class()
     [1] "sf" "data.frame"
     >
     > # group_by:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc %>% group_by(area_cl) %>% class()
     [1] "sf" "grouped_df" "tbl_df" "tbl" "data.frame"
     >
     > # mutate:
     > nc2 <- nc %>% mutate(area10 = AREA/10)
     >
     > # transmute:
     > nc %>% transmute(AREA = AREA/10, geometry = geometry) %>% class()
     [1] "sf" "data.frame"
     > nc %>% transmute(AREA = AREA/10) %>% class()
     [1] "sf" "data.frame"
     >
     > # rename:
     > nc2 <- nc %>% rename(area = AREA)
     >
     > # distinct:
     > nc[c(1:100,1:10),] %>% distinct() %>% nrow()
     [1] 100
     >
     > # summarize:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.g <- nc %>% group_by(area_cl)
     > nc.g %>% summarise(mean(AREA))
     Simple feature collection with 4 features and 2 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     # A tibble: 4 x 3
     area_cl `mean(AREA)` geometry
     <fctr> <dbl> <simple_feature>
     1 (0,0.1] 0.07602857 <MULTIPOLYGON...>
     2 (0.1,0.12] 0.11206667 <MULTIPOLYGON...>
     3 (0.12,0.15] 0.13422727 <MULTIPOLYGON...>
     4 (0.15,0.25] 0.19039286 <MULTIPOLYGON...>
     > nc.g %>% summarize(mean(AREA)) %>% plot(col = 3:6/7)
     >
     > library(tidyr)
     >
     > # time-wide to long table, using tidyr::gather
     > # stack the two SID columns for the July 1, 1974 - June 30, 1978 and July 1, 1979 - June 30, 1984 periods
     > # (see https://cran.r-project.org/web/packages/spdep/vignettes/sids.pdf)
     > nc %>% select(SID74, SID79, geometry) %>% gather(VAR, SID, -geometry) %>% summary()
     VAR SID geometry
     Length:200 Min. : 0.000 MULTIPOLYGON :200
     Class :character 1st Qu.: 2.000 epsg:4267 : 0
     Mode :character Median : 5.000 +proj=long...: 0
     Mean : 7.515
     3rd Qu.: 9.000
     Max. :57.000
     >
     > # spread:
     > nc$row = 1:100
     > nc.g <- nc %>% select(SID74, SID79, row) %>% gather(VAR, SID, -row, -geometry)
     > nc.g %>% tail()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -79.0745 ymin: 33.88199 xmax: -76.2877 ymax: 35.01666
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row VAR SID geometry
     195 95 SID79 4 MULTIPOLYGON(((-77.14895629...
     196 96 SID79 5 MULTIPOLYGON(((-78.26149749...
     197 97 SID79 3 MULTIPOLYGON(((-78.02592468...
     198 98 SID79 17 MULTIPOLYGON(((-78.65571594...
     199 99 SID79 9 MULTIPOLYGON(((-77.96073150...
     200 100 SID79 6 MULTIPOLYGON(((-78.65571594...
     > nc.g %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     > nc %>% select(SID74, SID79, geometry, row) %>% gather(VAR, SID, -geometry, -row) %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     >
     > # test st_set_crs in pipe:
     > sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
     > x <- sfc %>% st_set_crs(4326) %>% st_transform(3857)
     > x
     Geometry set for 2 features
     geometry type: POINT
     dimension: XY
     bbox: xmin: 0 ymin: -7.081155e-10 xmax: 111319.5 ymax: 111325.1
     epsg (SRID): 3857
     proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
     POINT(0 -7.08115455161362e-10)
     POINT(111319.490793274 111325.142866385)
     >
     > library(units)
     > person = make_unit("person")
     > nc = st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
     > nc.merc <- st_transform(nc, 32119) # NC State Plane
     >
     > nc.merc <- nc.merc %>% mutate(area = st_area(nc.merc), dens = BIR74 * person /area)
     >
     > # summary(nc.merc$dens) # requires units 0.4-2
     > nc.merc$area_cl <- cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.grp <- nc.merc %>% group_by(area_cl)
     >
     > out <- nc.grp %>% summarise(A = sum(area), pop = sum(dens * area),
     + new_dens = sum(dens * area)/sum(area))
     >
     > # mean densities depend on grouping:
     > nc.merc %>% summarize(mean(dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     mean(dens) geometry
     1 2.593234e-06 person/m^2 MULTIPOLYGON(((834893.70840...
     > out %>% summarise(mean(new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `mean(new_dens)` geometry
     <units> <simple_feature>
     1 2.589362e-06 person/m^2 <MULTIPOLYGON...>
     >
     > # total densities don't:
     > nc.merc %>% summarise(sum(area * dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     sum(area * dens) geometry
     1 329962 person MULTIPOLYGON(((834893.70840...
     > out %>% summarise(sum(A * new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64

Version: 0.5-0
Check: installed package size
Result: NOTE
     installed size is 13.3Mb
     sub-directories of 1Mb or more:
     doc 4.0Mb
     libs 5.7Mb
     sqlite 1.5Mb
Flavors: r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-patched-solaris-sparc, r-patched-solaris-x86, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 0.5-0
Check: tests
Result: ERROR
     Running ‘cast.R’
     Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ...4c4
    < Linking to GEOS 3.5.0, GDAL 2.0.2, proj.4 4.9.2
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running ‘crs.R’
     Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ...47c47
    < [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957388243134,0.343987817378283,-1.87740163998045,4.0725 +units=m +no_defs"
    ---
    > [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +units=m +no_defs"
    57c57
    < [1] "+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs"
    ---
    > [1] "+proj=longlat +datum=WGS84 +no_defs"
     Running ‘dist.R’
     Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ...109c109
    < MULTIPOINT(505.997685423939 -7.08115455161362e-...
    ---
    > MULTIPOINT(505.997685423971 -7.08115455161362e-...
     Running ‘dplyr.R’ [6s/14s]
     Running ‘empty.R’
     Comparing ‘empty.Rout’ to ‘empty.Rout.save’ ... OK
     Running ‘gdal_geom.R’
     Comparing ‘gdal_geom.Rout’ to ‘gdal_geom.Rout.save’ ... OK
     Running ‘geos.R’ [9s/18s]
     Comparing ‘geos.Rout’ to ‘geos.Rout.save’ ... OK
     Running ‘graticule.R’
     Comparing ‘graticule.Rout’ to ‘graticule.Rout.save’ ... OK
     Running ‘grid.R’
     Comparing ‘grid.Rout’ to ‘grid.Rout.save’ ... OK
     Running ‘plot.R’ [19s/39s]
     Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
     Running ‘read.R’
     Running ‘roundtrip.R’ [11s/23s]
     Comparing ‘roundtrip.Rout’ to ‘roundtrip.Rout.save’ ... OK
     Running ‘sfc.R’
     Comparing ‘sfc.Rout’ to ‘sfc.Rout.save’ ...125c125
    < proj4string: +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
    ---
    > proj4string: +proj=longlat +datum=WGS84 +no_defs
    170c170
    < proj4string: +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
    ---
    > proj4string: +proj=longlat +datum=WGS84 +no_defs
    173,174d172
    < Warning message:
    < st_crs<- : replacing crs does not reproject data; use st_transform for that
    347,348c345
    < Error in st_polygonize.sfc(st_sfc(x)) :
    < inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    ---
    > Error : inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    370c367
    < "3.5.0" "2.0.2" "4.9.2"
    ---
    > "3.5.1" "2.1.3" "4.9.2"
     Running ‘sfg.R’
     Comparing ‘sfg.Rout’ to ‘sfg.Rout.save’ ... OK
     Running ‘testthat.R’ [13s/24s]
     Comparing ‘testthat.Rout’ to ‘testthat.Rout.save’ ...9c9
    < Reading layer `nc' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    16c16
    < Reading layer `nc' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    32a33
    > vdv
    33a35
    > .nc
    35c37
    < Dataset /data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    ---
    > Dataset /home/edzer/git/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    41c43
    < OK: 471 SKIPPED: 9 FAILED: 0
    ---
    > OK: 557 SKIPPED: 0 FAILED: 0
     Running ‘wkb.R’
     Comparing ‘wkb.Rout’ to ‘wkb.Rout.save’ ...77a78,81
    > LINESTRING (1 7,2 8,3 9,4 10,5 11,6 12)
    > MULTIPOINT (1 7,2 8,3 9,4 10,5 11,6 12)
    > POINT (0 0)
    > [1] "POINTM(0 0 0)"
    Running the tests in ‘tests/dplyr.R’ failed.
    Complete output:
     > suppressPackageStartupMessages(library(sf))
     > library(dplyr)
    
     Attaching package: 'dplyr'
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
     > nc %>% filter(AREA > .1) %>% plot()
     Warning message:
     plotting the first 10 out of 14 attributes; use max.plot = 14 to plot all
     >
     > # plot 10 smallest counties in grey:
     > nc %>%
     + select(BIR74, geometry) %>%
     + plot()
     >
     > nc %>%
     + select(AREA, geometry) %>%
     + arrange(AREA) %>%
     + slice(1:10) %>%
     + plot(add = TRUE, col = 'grey', main ="")
     >
     > # select: check both when geometry is part of the selection, and when not:
     > nc %>% select(SID74, SID79) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79, geometry) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79) %>% class()
     [1] "sf" "data.frame"
     > nc %>% select(SID74, SID79, geometry) %>% class()
     [1] "sf" "data.frame"
     >
     > # group_by:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc %>% group_by(area_cl) %>% class()
     [1] "sf" "grouped_df" "tbl_df" "tbl" "data.frame"
     >
     > # mutate:
     > nc2 <- nc %>% mutate(area10 = AREA/10)
     >
     > # transmute:
     > nc %>% transmute(AREA = AREA/10, geometry = geometry) %>% class()
     [1] "sf" "data.frame"
     > nc %>% transmute(AREA = AREA/10) %>% class()
     [1] "sf" "data.frame"
     >
     > # rename:
     > nc2 <- nc %>% rename(area = AREA)
     >
     > # distinct:
     > nc[c(1:100,1:10),] %>% distinct() %>% nrow()
     [1] 100
     >
     > # summarize:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.g <- nc %>% group_by(area_cl)
     > nc.g %>% summarise(mean(AREA))
     Simple feature collection with 4 features and 2 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     # A tibble: 4 x 3
     area_cl `mean(AREA)` geometry
     <fctr> <dbl> <simple_feature>
     1 (0,0.1] 0.07602857 <MULTIPOLYGON...>
     2 (0.1,0.12] 0.11206667 <MULTIPOLYGON...>
     3 (0.12,0.15] 0.13422727 <MULTIPOLYGON...>
     4 (0.15,0.25] 0.19039286 <MULTIPOLYGON...>
     > nc.g %>% summarize(mean(AREA)) %>% plot(col = 3:6/7)
     >
     > library(tidyr)
     >
     > # time-wide to long table, using tidyr::gather
     > # stack the two SID columns for the July 1, 1974 - June 30, 1978 and July 1, 1979 - June 30, 1984 periods
     > # (see https://cran.r-project.org/web/packages/spdep/vignettes/sids.pdf)
     > nc %>% select(SID74, SID79, geometry) %>% gather(VAR, SID, -geometry) %>% summary()
     VAR SID geometry
     Length:200 Min. : 0.000 MULTIPOLYGON :200
     Class :character 1st Qu.: 2.000 epsg:4267 : 0
     Mode :character Median : 5.000 +proj=long...: 0
     Mean : 7.515
     3rd Qu.: 9.000
     Max. :57.000
     >
     > # spread:
     > nc$row = 1:100
     > nc.g <- nc %>% select(SID74, SID79, row) %>% gather(VAR, SID, -row, -geometry)
     > nc.g %>% tail()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -79.0745 ymin: 33.88199 xmax: -76.2877 ymax: 35.01666
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row VAR SID geometry
     195 95 SID79 4 MULTIPOLYGON(((-77.14895629...
     196 96 SID79 5 MULTIPOLYGON(((-78.26149749...
     197 97 SID79 3 MULTIPOLYGON(((-78.02592468...
     198 98 SID79 17 MULTIPOLYGON(((-78.65571594...
     199 99 SID79 9 MULTIPOLYGON(((-77.96073150...
     200 100 SID79 6 MULTIPOLYGON(((-78.65571594...
     > nc.g %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     > nc %>% select(SID74, SID79, geometry, row) %>% gather(VAR, SID, -geometry, -row) %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     >
     > # test st_set_crs in pipe:
     > sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
     > x <- sfc %>% st_set_crs(4326) %>% st_transform(3857)
     > x
     Geometry set for 2 features
     geometry type: POINT
     dimension: XY
     bbox: xmin: 0 ymin: -7.081155e-10 xmax: 111319.5 ymax: 111325.1
     epsg (SRID): 3857
     proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
     POINT(0 -7.08115455161362e-10)
     POINT(111319.490793272 111325.142866385)
     >
     > library(units)
     > person = make_unit("person")
     > nc = st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
     > nc.merc <- st_transform(nc, 32119) # NC State Plane
     >
     > nc.merc <- nc.merc %>% mutate(area = st_area(nc.merc), dens = BIR74 * person /area)
     >
     > # summary(nc.merc$dens) # requires units 0.4-2
     > nc.merc$area_cl <- cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.grp <- nc.merc %>% group_by(area_cl)
     >
     > out <- nc.grp %>% summarise(A = sum(area), pop = sum(dens * area),
     + new_dens = sum(dens * area)/sum(area))
     >
     > # mean densities depend on grouping:
     > nc.merc %>% summarize(mean(dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     mean(dens) geometry
     1 2.593234e-06 person/m^2 MULTIPOLYGON(((834893.70840...
     > out %>% summarise(mean(new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `mean(new_dens)` geometry
     <units> <simple_feature>
     1 2.589362e-06 person/m^2 <MULTIPOLYGON...>
     >
     > # total densities don't:
     > nc.merc %>% summarise(sum(area * dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     sum(area * dens) geometry
     1 329962 person MULTIPOLYGON(((834893.70840...
     > out %>% summarise(sum(A * new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
    Running the tests in ‘tests/read.R’ failed.
    Complete output:
     > Sys.setenv(TZ="UTC")
     > suppressPackageStartupMessages(library(sf))
     > if ("GPKG" %in% st_drivers()$name) {
     + tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), "nc.gpkg", crs = 4267, quiet = TRUE)
     + tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE) # default layer name
     + }
     >
     > tst = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) # no layer specified
     >
     > # data from https://github.com/edzer/sfr/issues/6
     > tst = st_read(system.file("shape/storms_xyz.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyzm.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyz_feature.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyzm_feature.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     >
     > if ("GPKG" %in% st_drivers()$name) { # read Int64
     + print(st_read(system.file("gpkg/tl.gpkg", package="sf"), quiet = TRUE)$AWATER)
     + print(st_read(system.file("gpkg/tl.gpkg", package="sf"), , quiet = TRUE, int64_as_string = TRUE)$AWATER)
     + }
     [1] 1028678842
     [1] 1028678842
     Levels: 1028678842
     >
     > # see https://github.com/edzer/sfr/issues/45 :
     > if ("OSM" %in% st_drivers()$name && Sys.info()['sysname'] != "Darwin") {
     + osm = system.file("osm/overpass.osm", package="sf")
     + print(st_layers(osm))
     + suppressWarnings(print(st_layers(osm, do_count = TRUE)))
     + suppressWarnings(print(st_read(osm, "multipolygons", quiet = TRUE)))
     + }
     Driver: OSM
     Available layers:
     layer_name geometry_type features fields
     1 points Point NA 10
     2 lines Line String NA 9
     3 multilinestrings Multi Line String NA 4
     4 multipolygons Multi Polygon NA 25
     5 other_relations Geometry Collection NA 4
     Driver: OSM
     Available layers:
     layer_name geometry_type features fields
     1 points Point 0 10
     2 lines Line String 0 9
     3 multilinestrings Multi Line String 0 4
     4 multipolygons Multi Polygon 3 25
     5 other_relations Geometry Collection 0 4
     Simple feature collection with 3 features and 25 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -1.556254 ymin: 53.79519 xmax: -1.550716 ymax: 53.80341
     epsg (SRID): 4326
     proj4string: +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
     osm_id osm_way_id name type aeroway amenity admin_level barrier boundary
     1 <NA> 263958111 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     2 <NA> 301461256 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     3 <NA> 462227487 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     building craft geological historic land_area landuse leisure man_made
     1 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     2 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     3 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     military natural office place shop sport tourism other_tags
     1 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     2 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     3 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     geometry
     1 MULTIPOLYGON(((-1.5507185 5...
     2 MULTIPOLYGON(((-1.5557631 5...
     3 MULTIPOLYGON(((-1.551502 53...
     >
     > # layer opening option:
     > st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE,
     + options = c("ADJUST_TYPE=YES", "ENCODING=CPL_ENC_UTF8"))
     Simple feature collection with 100 features and 14 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     First 20 features:
     AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74
     1 0.114 1.442 1825 1825 Ashe 37009 37009 5 1091 1
     2 0.061 1.231 1827 1827 Alleghany 37005 37005 3 487 0
     3 0.143 1.630 1828 1828 Surry 37171 37171 86 3188 5
     4 0.070 2.968 1831 1831 Currituck 37053 37053 27 508 1
     5 0.153 2.206 1832 1832 Northampton 37131 37131 66 1421 9
     6 0.097 1.670 1833 1833 Hertford 37091 37091 46 1452 7
     7 0.062 1.547 1834 1834 Camden 37029 37029 15 286 0
     8 0.091 1.284 1835 1835 Gates 37073 37073 37 420 0
     9 0.118 1.421 1836 1836 Warren 37185 37185 93 968 4
     10 0.124 1.428 1837 1837 Stokes 37169 37169 85 1612 1
     11 0.114 1.352 1838 1838 Caswell 37033 37033 17 1035 2
     12 0.153 1.616 1839 1839 Rockingham 37157 37157 79 4449 16
     13 0.143 1.663 1840 1840 Granville 37077 37077 39 1671 4
     14 0.109 1.325 1841 1841 Person 37145 37145 73 1556 4
     15 0.072 1.085 1842 1842 Vance 37181 37181 91 2180 4
     16 0.190 2.204 1846 1846 Halifax 37083 37083 42 3608 18
     17 0.053 1.171 1848 1848 Pasquotank 37139 37139 70 1638 3
     18 0.199 1.984 1874 1874 Wilkes 37193 37193 97 3146 4
     19 0.081 1.288 1880 1880 Watauga 37189 37189 95 1323 1
     20 0.063 1.000 1881 1881 Perquimans 37143 37143 72 484 1
     NWBIR74 BIR79 SID79 NWBIR79 geometry
     1 10 1364 0 19 MULTIPOLYGON(((-81.47275543...
     2 10 542 3 12 MULTIPOLYGON(((-81.23989105...
     3 208 3616 6 260 MULTIPOLYGON(((-80.45634460...
     4 123 830 2 145 MULTIPOLYGON(((-76.00897216...
     5 1066 1606 3 1197 MULTIPOLYGON(((-77.21766662...
     6 954 1838 5 1237 MULTIPOLYGON(((-76.74506378...
     7 115 350 2 139 MULTIPOLYGON(((-76.00897216...
     8 254 594 2 371 MULTIPOLYGON(((-76.56250762...
     9 748 1190 2 844 MULTIPOLYGON(((-78.30876159...
     10 160 2038 5 176 MULTIPOLYGON(((-80.02567291...
     11 550 1253 2 597 MULTIPOLYGON(((-79.53050994...
     12 1243 5386 5 1369 MULTIPOLYGON(((-79.53050994...
     13 930 2074 4 1058 MULTIPOLYGON(((-78.74912261...
     14 613 1790 4 650 MULTIPOLYGON(((-78.80680084...
     15 1179 2753 6 1492 MULTIPOLYGON(((-78.49252319...
     16 2365 4463 17 2980 MULTIPOLYGON(((-77.33220672...
     17 622 2275 4 933 MULTIPOLYGON(((-76.29892730...
     18 200 3725 7 222 MULTIPOLYGON(((-81.02056884...
     19 17 1775 1 33 MULTIPOLYGON(((-81.80622100...
     20 230 676 0 310 MULTIPOLYGON(((-76.48052978...
     >
     > x <- st_sf(a = 1:2, geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2))))
     >
     > try(st_layers("foo")) # cannot open datasource
     Cannot open data source foo
     Error in CPL_get_layers(dsn, options, do_count) : Open failed.
    
     > try(st_read("foo")) # cannot open datasource
     Cannot open data source foo
     Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type, :
     Open failed.
    
     > try(st_read("x.gpkg", "xyz")) # cannot open layer
     Cannot open data source x.gpkg
     Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type, :
     Open failed.
    
     > try(st_write(c("foo", "bar")))
     Error in st_write(c("foo", "bar")) : inherits(obj, "sf") is not TRUE
     > try(st_write(x, c("foo", "bar")))
     Error in guess_driver(dns) : length(dsn) == 1 is not TRUE
     In addition: Warning message:
     In if (file.exists(dsn)) dsn = normalizePath(dsn) :
     the condition has length > 1 and only the first element will be used
     > try(st_write(x, "foo", driver = "foo"))
     driver `foo' not available.
     Error in CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options), :
     Driver not available.
    
     > if (Sys.getenv("USER") == "travis") {
     + try(st_write(x, "/x", driver = "ESRI Shapefile"))
     + }
     >
     > df <- data.frame(
     + a = c(0, 1, NA, -Inf, Inf),
     + b = c("a", "b", NA, "c", ""),
     + c = c(as.Date("2001-01-01"), NA, -99, 0, 1),
     + d = c(as.POSIXct("2001-01-01"), NA, -99, 0, 1),
     + x = 1:5,
     + y = 1:5)
     >
     > x = st_as_sf(df, coords = c("x", "y"))
     >
     > if ("GPKG" %in% st_drivers()$name) {
     + st_write(x, "x2.gpkg", quiet = TRUE)
     + y = st_read("x2.gpkg", quiet = TRUE)
     + print(y)
     + }
     Simple feature collection with 5 features and 4 fields
     geometry type: POINT
     dimension: XY
     bbox: xmin: 1 ymin: 1 xmax: 5 ymax: 5
     epsg (SRID): NA
     proj4string: NA
     a b c d geom
     1 0 a 2001-01-01 2001-01-01 00:00:00 POINT(1 1)
     2 1 b <NA> <NA> POINT(2 2)
     3 NA <NA> 1969-09-24 1969-12-31 23:58:21 POINT(3 3)
     4 -Inf c 1970-01-01 1970-01-01 00:00:00 POINT(4 4)
     5 Inf 1970-01-02 1970-01-01 00:00:01 POINT(5 5)
     >
     > if ("SQLite" %in% st_drivers()$name && require(RSQLite)) {
     + db = system.file("sqlite/meuse.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "meuse.sqlite")
     + m$GEOMETRY = st_as_sfc(m$GEOMETRY, spatialite = FALSE) # ISO wkb
     + print(st_sf(m), n = 3)
     +
     + db = system.file("sqlite/nc.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "nc.sqlite")
     + m$GEOMETRY = st_as_sfc(m$GEOMETRY, spatialite = FALSE) # ISO wkb
     + print(st_sf(m), n = 3)
     +
     + db = system.file("sqlite/b.sqlite", package = "sf") # has an INT8 field
     + b = st_read(db)
     + print(b)
     + b = st_read(db, int64_as_string=TRUE)
     + print(b)
     +
     + if (.Platform$endian == "little") {
     + db = system.file("sqlite/test3.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "HighWays")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Towns")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Regions")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + }
     + }
     Loading required package: RSQLite
     Error in UseMethod("st_as_sfc") :
     no applicable method for 'st_as_sfc' applied to an object of class "blob"
     Calls: st_as_sfc
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.5-0
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'cast.R' [1s]
     Comparing 'cast.Rout' to 'cast.Rout.save' ...4c4
    < Linking to GEOS 3.5.0, GDAL 2.1.1, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running 'crs.R' [1s]
     Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
     Running 'dist.R' [2s]
     Comparing 'dist.Rout' to 'dist.Rout.save' ...38,41c38,41
    < [1,] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 -5.820766e-11
    < [2,] 2.328306e-10 0.000000e+00 0.000000e+00 8.731149e-11 0.000000e+00
    < [3,] 2.328306e-10 0.000000e+00 0.000000e+00 2.910383e-11 0.000000e+00
    < [4,] 0.000000e+00 8.731149e-11 2.910383e-11 0.000000e+00 -1.455192e-11
    ---
    > [1,] -2.328306e-10 0.000000e+00 0.000000e+00 0.000000e+00 0
    > [2,] 2.328306e-10 0.000000e+00 0.000000e+00 2.910383e-11 0
    > [3,] 0.000000e+00 0.000000e+00 0.000000e+00 1.455192e-11 0
    > [4,] 0.000000e+00 2.910383e-11 1.455192e-11 0.000000e+00 0
    50,53c50,53
    < [1,] 0.000000e+00 0 0 0 0
    < [2,] 0.000000e+00 0 0 0 0
    < [3,] -1.776357e-15 0 0 0 0
    < [4,] 0.000000e+00 0 0 0 0
    ---
    > [1,] 0 0 0 0 0
    > [2,] 0 0 0 0 0
    > [3,] 0 0 0 0 0
    > [4,] 0 0 0 0 0
     Running 'dplyr.R' [4s]
     Running 'empty.R' [1s]
     Comparing 'empty.Rout' to 'empty.Rout.save' ... OK
     Running 'gdal_geom.R' [1s]
     Comparing 'gdal_geom.Rout' to 'gdal_geom.Rout.save' ...91c91
    < GDAL has 56 drivers
    ---
    > GDAL has 75 drivers
     Running 'geos.R' [6s]
     Comparing 'geos.Rout' to 'geos.Rout.save' ... OK
     Running 'graticule.R' [3s]
     Comparing 'graticule.Rout' to 'graticule.Rout.save' ... OK
     Running 'grid.R' [2s]
     Comparing 'grid.Rout' to 'grid.Rout.save' ... OK
     Running 'plot.R' [14s]
     Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
     Running 'read.R' [2s]
     Running 'roundtrip.R' [7s]
     Comparing 'roundtrip.Rout' to 'roundtrip.Rout.save' ... OK
     Running 'sfc.R' [3s]
     Comparing 'sfc.Rout' to 'sfc.Rout.save' ...345,346c345
    < Error in st_polygonize.sfc(st_sfc(x)) :
    < inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    ---
    > Error : inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    368c367
    < "3.5.0" "2.1.1" "4.9.3"
    ---
    > "3.5.1" "2.1.3" "4.9.2"
     Running 'sfg.R' [1s]
     Comparing 'sfg.Rout' to 'sfg.Rout.save' ... OK
     Running 'testthat.R' [10s]
     Comparing 'testthat.Rout' to 'testthat.Rout.save' ...9c9
    < Reading layer `nc' from data source `D:\temp\Rtmpsjz2XC\RLIBS_3120441943348\sf\shape\nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    16c16
    < Reading layer `nc' from data source `D:\temp\Rtmpsjz2XC\RLIBS_3120441943348\sf\shape\nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    34a35
    > .nc
    36c37
    < Dataset d:\RCompile\CRANpkg\local\3.5\sf.Rcheck\tests_i386\testthat\x.gpkg already exists: remove first, use update=TRUE to append,
    ---
    > Dataset /home/edzer/git/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    42c43
    < OK: 471 SKIPPED: 9 FAILED: 0
    ---
    > OK: 557 SKIPPED: 0 FAILED: 0
     Running 'wkb.R' [1s]
     Comparing 'wkb.Rout' to 'wkb.Rout.save' ... OK
    Running the tests in 'tests/dplyr.R' failed.
    Last 13 lines of output:
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
    Running the tests in 'tests/read.R' failed.
    Last 13 lines of output:
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Towns")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Regions")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + }
     + }
     Loading required package: RSQLite
     Error in UseMethod("st_as_sfc") :
     no applicable method for 'st_as_sfc' applied to an object of class "blob"
     Calls: st_as_sfc
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.5-0
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'cast.R' [2s]
     Comparing 'cast.Rout' to 'cast.Rout.save' ...4c4
    < Linking to GEOS 3.5.0, GDAL 2.1.1, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running 'crs.R' [1s]
     Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
     Running 'dist.R' [2s]
     Comparing 'dist.Rout' to 'dist.Rout.save' ... OK
     Running 'dplyr.R' [4s]
     Running 'empty.R' [1s]
     Comparing 'empty.Rout' to 'empty.Rout.save' ... OK
     Running 'gdal_geom.R' [1s]
     Comparing 'gdal_geom.Rout' to 'gdal_geom.Rout.save' ...91c91
    < GDAL has 56 drivers
    ---
    > GDAL has 75 drivers
     Running 'geos.R' [6s]
     Comparing 'geos.Rout' to 'geos.Rout.save' ... OK
     Running 'graticule.R' [3s]
     Comparing 'graticule.Rout' to 'graticule.Rout.save' ... OK
     Running 'grid.R' [2s]
     Comparing 'grid.Rout' to 'grid.Rout.save' ... OK
     Running 'plot.R' [15s]
     Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
     Running 'read.R' [2s]
     Running 'roundtrip.R' [7s]
     Comparing 'roundtrip.Rout' to 'roundtrip.Rout.save' ... OK
     Running 'sfc.R' [3s]
     Comparing 'sfc.Rout' to 'sfc.Rout.save' ...345,346c345
    < Error in st_polygonize.sfc(st_sfc(x)) :
    < inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    ---
    > Error : inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
    368c367
    < "3.5.0" "2.1.1" "4.9.3"
    ---
    > "3.5.1" "2.1.3" "4.9.2"
     Running 'sfg.R' [1s]
     Comparing 'sfg.Rout' to 'sfg.Rout.save' ... OK
     Running 'testthat.R' [9s]
     Comparing 'testthat.Rout' to 'testthat.Rout.save' ...9c9
    < Reading layer `nc' from data source `D:\temp\Rtmpsjz2XC\RLIBS_3120441943348\sf\shape\nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    16c16
    < Reading layer `nc' from data source `D:\temp\Rtmpsjz2XC\RLIBS_3120441943348\sf\shape\nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    34a35
    > .nc
    36c37
    < Dataset d:\RCompile\CRANpkg\local\3.5\sf.Rcheck\tests_x64\testthat\x.gpkg already exists: remove first, use update=TRUE to append,
    ---
    > Dataset /home/edzer/git/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    42c43
    < OK: 471 SKIPPED: 9 FAILED: 0
    ---
    > OK: 557 SKIPPED: 0 FAILED: 0
     Running 'wkb.R' [1s]
     Comparing 'wkb.Rout' to 'wkb.Rout.save' ... OK
    Running the tests in 'tests/dplyr.R' failed.
    Last 13 lines of output:
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
    Running the tests in 'tests/read.R' failed.
    Last 13 lines of output:
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Towns")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Regions")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + }
     + }
     Loading required package: RSQLite
     Error in UseMethod("st_as_sfc") :
     no applicable method for 'st_as_sfc' applied to an object of class "blob"
     Calls: st_as_sfc
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.5-0
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: ‘microbenchmark’
Flavors: r-patched-solaris-sparc, r-patched-solaris-x86

Version: 0.5-0
Check: tests
Result: ERROR
     Running ‘cast.R’
     Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ...4c4
    < Linking to GEOS 3.6.1, GDAL 2.2.0, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running ‘crs.R’
     Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ...15c15,16
    < GDAL Error 6: EPSG PCS/GCS code -1 not found in EPSG support files. Is this a valid EPSG coordinate system?
    ---
    > GDAL Error 6: EPSG PCS/GCS code -1 not found in EPSG support files. Is this a valid
    > EPSG coordinate system?
    27c28,29
    < GDAL Error 6: EPSG PCS/GCS code 999999 not found in EPSG support files. Is this a valid EPSG coordinate system?
    ---
    > GDAL Error 6: EPSG PCS/GCS code 999999 not found in EPSG support files. Is this a valid
    > EPSG coordinate system?
    45c47
    < [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.2369,50.0087,465.658,-0.406857,0.350733,-1.87035,4.0812 +units=m +no_defs"
    ---
    > [1] "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.87740,4.0725 +units=m +no_defs"
     Running ‘dist.R’
     Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ... OK
     Running ‘dplyr.R’
     Running ‘empty.R’
     Comparing ‘empty.Rout’ to ‘empty.Rout.save’ ... OK
     Running ‘gdal_geom.R’
     Comparing ‘gdal_geom.Rout’ to ‘gdal_geom.Rout.save’ ...91c91
    < GDAL has 63 drivers
    ---
    > GDAL has 75 drivers
     Running ‘geos.R’
     Comparing ‘geos.Rout’ to ‘geos.Rout.save’ ... OK
     Running ‘graticule.R’
     Comparing ‘graticule.Rout’ to ‘graticule.Rout.save’ ... OK
     Running ‘grid.R’
     Comparing ‘grid.Rout’ to ‘grid.Rout.save’ ... OK
     Running ‘plot.R’ [20s/20s]
     Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
     Running ‘read.R’
     Running ‘roundtrip.R’
     Comparing ‘roundtrip.Rout’ to ‘roundtrip.Rout.save’ ...71c71
    < Ah :39 1st Qu.: 80.0 epsg:NA : 0
    ---
    > Ah :39 1st Qu.: 80.0 epsg:28992 : 0
    87c87
    < epsg:NA : 0
    ---
    > epsg:28992 : 0
    95c95
    < epsg:NA :0
    ---
    > epsg:28992 :0
    100c100
    < epsg:NA :0
    ---
    > epsg:28992 :0
    105c105
    < epsg:NA :0
    ---
    > epsg:28992 :0
    118c118
    < epsg:NA : 0
    ---
    > epsg:28992 : 0
    133c133
    < epsg:NA : 0
    ---
    > epsg:28992 : 0
     Running ‘sfc.R’
     Comparing ‘sfc.Rout’ to ‘sfc.Rout.save’ ...367c367
    < "3.6.1" "2.2.0" "4.9.3"
    ---
    > "3.5.1" "2.1.3" "4.9.2"
     Running ‘sfg.R’
     Comparing ‘sfg.Rout’ to ‘sfg.Rout.save’ ... OK
     Running ‘testthat.R’ [13s/13s]
     Comparing ‘testthat.Rout’ to ‘testthat.Rout.save’ ...9c9
    < Reading layer `nc' from data source `/home/ripley/R/Lib32/sf/shape/nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    16c16
    < Reading layer `nc' from data source `/home/ripley/R/Lib32/sf/shape/nc.shp' using driver `ESRI Shapefile'
    ---
    > Reading layer `nc' from data source `/home/edzer/git/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
    37c37
    < Dataset /home/ripley/R/packages/tests32/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    ---
    > Dataset /home/edzer/git/sf.Rcheck/tests/testthat/x.gpkg already exists: remove first, use update=TRUE to append,
    43c43
    < OK: 471 SKIPPED: 9 FAILED: 0
    ---
    > OK: 557 SKIPPED: 0 FAILED: 0
     Running ‘wkb.R’
     Comparing ‘wkb.Rout’ to ‘wkb.Rout.save’ ... OK
    Running the tests in ‘tests/dplyr.R’ failed.
    Complete output:
     > suppressPackageStartupMessages(library(sf))
     > library(dplyr)
    
     Attaching package: 'dplyr'
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
     > nc %>% filter(AREA > .1) %>% plot()
     Warning message:
     plotting the first 10 out of 14 attributes; use max.plot = 14 to plot all
     >
     > # plot 10 smallest counties in grey:
     > nc %>%
     + select(BIR74, geometry) %>%
     + plot()
     >
     > nc %>%
     + select(AREA, geometry) %>%
     + arrange(AREA) %>%
     + slice(1:10) %>%
     + plot(add = TRUE, col = 'grey', main ="")
     >
     > # select: check both when geometry is part of the selection, and when not:
     > nc %>% select(SID74, SID79) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79, geometry) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79) %>% class()
     [1] "sf" "data.frame"
     > nc %>% select(SID74, SID79, geometry) %>% class()
     [1] "sf" "data.frame"
     >
     > # group_by:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc %>% group_by(area_cl) %>% class()
     [1] "sf" "grouped_df" "tbl_df" "tbl" "data.frame"
     >
     > # mutate:
     > nc2 <- nc %>% mutate(area10 = AREA/10)
     >
     > # transmute:
     > nc %>% transmute(AREA = AREA/10, geometry = geometry) %>% class()
     [1] "sf" "data.frame"
     > nc %>% transmute(AREA = AREA/10) %>% class()
     [1] "sf" "data.frame"
     >
     > # rename:
     > nc2 <- nc %>% rename(area = AREA)
     >
     > # distinct:
     > nc[c(1:100,1:10),] %>% distinct() %>% nrow()
     [1] 100
     >
     > # summarize:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.g <- nc %>% group_by(area_cl)
     > nc.g %>% summarise(mean(AREA))
     Simple feature collection with 4 features and 2 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     # A tibble: 4 x 3
     area_cl `mean(AREA)` geometry
     <fctr> <dbl> <simple_feature>
     1 (0,0.1] 0.07602857 <MULTIPOLYGON...>
     2 (0.1,0.12] 0.11206667 <MULTIPOLYGON...>
     3 (0.12,0.15] 0.13422727 <MULTIPOLYGON...>
     4 (0.15,0.25] 0.19039286 <MULTIPOLYGON...>
     > nc.g %>% summarize(mean(AREA)) %>% plot(col = 3:6/7)
     >
     > library(tidyr)
     >
     > # time-wide to long table, using tidyr::gather
     > # stack the two SID columns for the July 1, 1974 - June 30, 1978 and July 1, 1979 - June 30, 1984 periods
     > # (see https://cran.r-project.org/web/packages/spdep/vignettes/sids.pdf)
     > nc %>% select(SID74, SID79, geometry) %>% gather(VAR, SID, -geometry) %>% summary()
     VAR SID geometry
     Length:200 Min. : 0.000 MULTIPOLYGON :200
     Class :character 1st Qu.: 2.000 epsg:4267 : 0
     Mode :character Median : 5.000 +proj=long...: 0
     Mean : 7.515
     3rd Qu.: 9.000
     Max. :57.000
     >
     > # spread:
     > nc$row = 1:100
     > nc.g <- nc %>% select(SID74, SID79, row) %>% gather(VAR, SID, -row, -geometry)
     > nc.g %>% tail()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -79.0745 ymin: 33.88199 xmax: -76.2877 ymax: 35.01666
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row VAR SID geometry
     195 95 SID79 4 MULTIPOLYGON(((-77.14895629...
     196 96 SID79 5 MULTIPOLYGON(((-78.26149749...
     197 97 SID79 3 MULTIPOLYGON(((-78.02592468...
     198 98 SID79 17 MULTIPOLYGON(((-78.65571594...
     199 99 SID79 9 MULTIPOLYGON(((-77.96073150...
     200 100 SID79 6 MULTIPOLYGON(((-78.65571594...
     > nc.g %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     > nc %>% select(SID74, SID79, geometry, row) %>% gather(VAR, SID, -geometry, -row) %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     >
     > # test st_set_crs in pipe:
     > sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
     > x <- sfc %>% st_set_crs(4326) %>% st_transform(3857)
     > x
     Geometry set for 2 features
     geometry type: POINT
     dimension: XY
     bbox: xmin: 0 ymin: -7.081155e-10 xmax: 111319.5 ymax: 111325.1
     epsg (SRID): 3857
     proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
     POINT(0 -7.08115455161362e-10)
     POINT(111319.490793274 111325.142866385)
     >
     > library(units)
     > person = make_unit("person")
     > nc = st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
     > nc.merc <- st_transform(nc, 32119) # NC State Plane
     >
     > nc.merc <- nc.merc %>% mutate(area = st_area(nc.merc), dens = BIR74 * person /area)
     >
     > # summary(nc.merc$dens) # requires units 0.4-2
     > nc.merc$area_cl <- cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.grp <- nc.merc %>% group_by(area_cl)
     >
     > out <- nc.grp %>% summarise(A = sum(area), pop = sum(dens * area),
     + new_dens = sum(dens * area)/sum(area))
     >
     > # mean densities depend on grouping:
     > nc.merc %>% summarize(mean(dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     mean(dens) geometry
     1 2.593234e-06 person/m^2 MULTIPOLYGON(((834893.70840...
     > out %>% summarise(mean(new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `mean(new_dens)` geometry
     <units> <simple_feature>
     1 2.589362e-06 person/m^2 <MULTIPOLYGON...>
     >
     > # total densities don't:
     > nc.merc %>% summarise(sum(area * dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     sum(area * dens) geometry
     1 329962 person MULTIPOLYGON(((834893.70840...
     > out %>% summarise(sum(A * new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
    Running the tests in ‘tests/read.R’ failed.
    Complete output:
     > Sys.setenv(TZ="UTC")
     > suppressPackageStartupMessages(library(sf))
     > if ("GPKG" %in% st_drivers()$name) {
     + tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), "nc.gpkg", crs = 4267, quiet = TRUE)
     + tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE) # default layer name
     + }
     >
     > tst = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) # no layer specified
     >
     > # data from https://github.com/edzer/sfr/issues/6
     > tst = st_read(system.file("shape/storms_xyz.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyzm.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYM" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyz_feature.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYZ" "LINESTRING" "sfg"
     > tst = st_read(system.file("shape/storms_xyzm_feature.shp", package="sf"), quiet = TRUE)
     > class(st_geometry(tst))
     [1] "sfc_LINESTRING" "sfc"
     > class(st_geometry(tst)[[1]])
     [1] "XYM" "LINESTRING" "sfg"
     >
     > if ("GPKG" %in% st_drivers()$name) { # read Int64
     + print(st_read(system.file("gpkg/tl.gpkg", package="sf"), quiet = TRUE)$AWATER)
     + print(st_read(system.file("gpkg/tl.gpkg", package="sf"), , quiet = TRUE, int64_as_string = TRUE)$AWATER)
     + }
     [1] 1028678842
     [1] 1028678842
     Levels: 1028678842
     >
     > # see https://github.com/edzer/sfr/issues/45 :
     > if ("OSM" %in% st_drivers()$name && Sys.info()['sysname'] != "Darwin") {
     + osm = system.file("osm/overpass.osm", package="sf")
     + print(st_layers(osm))
     + suppressWarnings(print(st_layers(osm, do_count = TRUE)))
     + suppressWarnings(print(st_read(osm, "multipolygons", quiet = TRUE)))
     + }
     Driver: OSM
     Available layers:
     layer_name geometry_type features fields
     1 points Point NA 10
     2 lines Line String NA 9
     3 multilinestrings Multi Line String NA 4
     4 multipolygons Multi Polygon NA 25
     5 other_relations Geometry Collection NA 4
     Driver: OSM
     Available layers:
     layer_name geometry_type features fields
     1 points Point 0 10
     2 lines Line String 0 9
     3 multilinestrings Multi Line String 0 4
     4 multipolygons Multi Polygon 3 25
     5 other_relations Geometry Collection 0 4
     Simple feature collection with 3 features and 25 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -1.556254 ymin: 53.79519 xmax: -1.550716 ymax: 53.80341
     epsg (SRID): 4326
     proj4string: +proj=longlat +datum=WGS84 +no_defs
     osm_id osm_way_id name type aeroway amenity admin_level barrier boundary
     1 <NA> 263958111 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     2 <NA> 301461256 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     3 <NA> 462227487 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     building craft geological historic land_area landuse leisure man_made
     1 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     2 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     3 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
     military natural office place shop sport tourism other_tags
     1 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     2 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     3 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
     geometry
     1 MULTIPOLYGON(((-1.5507185 5...
     2 MULTIPOLYGON(((-1.5557631 5...
     3 MULTIPOLYGON(((-1.551502 53...
     >
     > # layer opening option:
     > st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE,
     + options = c("ADJUST_TYPE=YES", "ENCODING=CPL_ENC_UTF8"))
     Simple feature collection with 100 features and 14 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     First 20 features:
     AREA PERIMETER CNTY_ CNTY_ID NAME FIPS FIPSNO CRESS_ID BIR74 SID74
     1 0.114 1.442 1825 1825 Ashe 37009 37009 5 1091 1
     2 0.061 1.231 1827 1827 Alleghany 37005 37005 3 487 0
     3 0.143 1.630 1828 1828 Surry 37171 37171 86 3188 5
     4 0.070 2.968 1831 1831 Currituck 37053 37053 27 508 1
     5 0.153 2.206 1832 1832 Northampton 37131 37131 66 1421 9
     6 0.097 1.670 1833 1833 Hertford 37091 37091 46 1452 7
     7 0.062 1.547 1834 1834 Camden 37029 37029 15 286 0
     8 0.091 1.284 1835 1835 Gates 37073 37073 37 420 0
     9 0.118 1.421 1836 1836 Warren 37185 37185 93 968 4
     10 0.124 1.428 1837 1837 Stokes 37169 37169 85 1612 1
     11 0.114 1.352 1838 1838 Caswell 37033 37033 17 1035 2
     12 0.153 1.616 1839 1839 Rockingham 37157 37157 79 4449 16
     13 0.143 1.663 1840 1840 Granville 37077 37077 39 1671 4
     14 0.109 1.325 1841 1841 Person 37145 37145 73 1556 4
     15 0.072 1.085 1842 1842 Vance 37181 37181 91 2180 4
     16 0.190 2.204 1846 1846 Halifax 37083 37083 42 3608 18
     17 0.053 1.171 1848 1848 Pasquotank 37139 37139 70 1638 3
     18 0.199 1.984 1874 1874 Wilkes 37193 37193 97 3146 4
     19 0.081 1.288 1880 1880 Watauga 37189 37189 95 1323 1
     20 0.063 1.000 1881 1881 Perquimans 37143 37143 72 484 1
     NWBIR74 BIR79 SID79 NWBIR79 geometry
     1 10 1364 0 19 MULTIPOLYGON(((-81.47275543...
     2 10 542 3 12 MULTIPOLYGON(((-81.23989105...
     3 208 3616 6 260 MULTIPOLYGON(((-80.45634460...
     4 123 830 2 145 MULTIPOLYGON(((-76.00897216...
     5 1066 1606 3 1197 MULTIPOLYGON(((-77.21766662...
     6 954 1838 5 1237 MULTIPOLYGON(((-76.74506378...
     7 115 350 2 139 MULTIPOLYGON(((-76.00897216...
     8 254 594 2 371 MULTIPOLYGON(((-76.56250762...
     9 748 1190 2 844 MULTIPOLYGON(((-78.30876159...
     10 160 2038 5 176 MULTIPOLYGON(((-80.02567291...
     11 550 1253 2 597 MULTIPOLYGON(((-79.53050994...
     12 1243 5386 5 1369 MULTIPOLYGON(((-79.53050994...
     13 930 2074 4 1058 MULTIPOLYGON(((-78.74912261...
     14 613 1790 4 650 MULTIPOLYGON(((-78.80680084...
     15 1179 2753 6 1492 MULTIPOLYGON(((-78.49252319...
     16 2365 4463 17 2980 MULTIPOLYGON(((-77.33220672...
     17 622 2275 4 933 MULTIPOLYGON(((-76.29892730...
     18 200 3725 7 222 MULTIPOLYGON(((-81.02056884...
     19 17 1775 1 33 MULTIPOLYGON(((-81.80622100...
     20 230 676 0 310 MULTIPOLYGON(((-76.48052978...
     >
     > x <- st_sf(a = 1:2, geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2))))
     >
     > try(st_layers("foo")) # cannot open datasource
     Cannot open data source foo
     Error in CPL_get_layers(dsn, options, do_count) : Open failed.
    
     > try(st_read("foo")) # cannot open datasource
     Cannot open data source foo
     Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type, :
     Open failed.
    
     > try(st_read("x.gpkg", "xyz")) # cannot open layer
     Cannot open data source x.gpkg
     Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type, :
     Open failed.
    
     > try(st_write(c("foo", "bar")))
     Error : inherits(obj, "sf") is not TRUE
     > try(st_write(x, c("foo", "bar")))
     Error : length(dsn) == 1 is not TRUE
     In addition: Warning message:
     In if (file.exists(dsn)) dsn = normalizePath(dsn) :
     the condition has length > 1 and only the first element will be used
     > try(st_write(x, "foo", driver = "foo"))
     driver `foo' not available.
     Error in CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options), :
     Driver not available.
    
     > if (Sys.getenv("USER") == "travis") {
     + try(st_write(x, "/x", driver = "ESRI Shapefile"))
     + }
     >
     > df <- data.frame(
     + a = c(0, 1, NA, -Inf, Inf),
     + b = c("a", "b", NA, "c", ""),
     + c = c(as.Date("2001-01-01"), NA, -99, 0, 1),
     + d = c(as.POSIXct("2001-01-01"), NA, -99, 0, 1),
     + x = 1:5,
     + y = 1:5)
     >
     > x = st_as_sf(df, coords = c("x", "y"))
     >
     > if ("GPKG" %in% st_drivers()$name) {
     + st_write(x, "x2.gpkg", quiet = TRUE)
     + y = st_read("x2.gpkg", quiet = TRUE)
     + print(y)
     + }
     Simple feature collection with 5 features and 4 fields
     geometry type: POINT
     dimension: XY
     bbox: xmin: 1 ymin: 1 xmax: 5 ymax: 5
     epsg (SRID): NA
     proj4string: NA
     a b c d geom
     1 0 a 2001-01-01 2001-01-01 00:00:00 POINT(1 1)
     2 1 b <NA> <NA> POINT(2 2)
     3 NA <NA> 1969-09-24 1969-12-31 23:58:21 POINT(3 3)
     4 -Inf c 1970-01-01 1970-01-01 00:00:00 POINT(4 4)
     5 Inf 1970-01-02 1970-01-01 00:00:01 POINT(5 5)
     >
     > if ("SQLite" %in% st_drivers()$name && require(RSQLite)) {
     + db = system.file("sqlite/meuse.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "meuse.sqlite")
     + m$GEOMETRY = st_as_sfc(m$GEOMETRY, spatialite = FALSE) # ISO wkb
     + print(st_sf(m), n = 3)
     +
     + db = system.file("sqlite/nc.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "nc.sqlite")
     + m$GEOMETRY = st_as_sfc(m$GEOMETRY, spatialite = FALSE) # ISO wkb
     + print(st_sf(m), n = 3)
     +
     + db = system.file("sqlite/b.sqlite", package = "sf") # has an INT8 field
     + b = st_read(db)
     + print(b)
     + b = st_read(db, int64_as_string=TRUE)
     + print(b)
     +
     + if (.Platform$endian == "little") {
     + db = system.file("sqlite/test3.sqlite", package = "sf")
     + dbcon <- dbConnect(dbDriver("SQLite"), db)
     + m = dbReadTable(dbcon, "HighWays")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Towns")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + m = dbReadTable(dbcon, "Regions")
     + m$Geometry = st_as_sfc(m$Geometry, spatialite = TRUE) # spatialite wkb
     + print(st_sf(m), n = 3)
     + }
     + }
     Loading required package: RSQLite
     Error in UseMethod("st_as_sfc") :
     no applicable method for 'st_as_sfc' applied to an object of class "blob"
     Calls: st_as_sfc
     Execution halted
Flavor: r-patched-solaris-x86

Version: 0.5-0
Check: tests
Result: ERROR
     Running ‘cast.R’ [1s/1s]
     Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ...4c4
    < Linking to GEOS 3.5.1, GDAL 2.1.2, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running ‘crs.R’ [0s/1s]
     Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ... OK
     Running ‘dist.R’ [1s/1s]
     Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ... OK
     Running ‘dplyr.R’ [3s/3s]
    Running the tests in ‘tests/dplyr.R’ failed.
    Complete output:
     > suppressPackageStartupMessages(library(sf))
     > library(dplyr)
    
     Attaching package: 'dplyr'
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
     > nc %>% filter(AREA > .1) %>% plot()
     Warning message:
     plotting the first 10 out of 14 attributes; use max.plot = 14 to plot all
     >
     > # plot 10 smallest counties in grey:
     > nc %>%
     + select(BIR74, geometry) %>%
     + plot()
     >
     > nc %>%
     + select(AREA, geometry) %>%
     + arrange(AREA) %>%
     + slice(1:10) %>%
     + plot(add = TRUE, col = 'grey', main ="")
     >
     > # select: check both when geometry is part of the selection, and when not:
     > nc %>% select(SID74, SID79) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79, geometry) %>% names()
     [1] "SID74" "SID79" "geometry"
     > nc %>% select(SID74, SID79) %>% class()
     [1] "sf" "data.frame"
     > nc %>% select(SID74, SID79, geometry) %>% class()
     [1] "sf" "data.frame"
     >
     > # group_by:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc %>% group_by(area_cl) %>% class()
     [1] "sf" "grouped_df" "tbl_df" "tbl" "data.frame"
     >
     > # mutate:
     > nc2 <- nc %>% mutate(area10 = AREA/10)
     >
     > # transmute:
     > nc %>% transmute(AREA = AREA/10, geometry = geometry) %>% class()
     [1] "sf" "data.frame"
     > nc %>% transmute(AREA = AREA/10) %>% class()
     [1] "sf" "data.frame"
     >
     > # rename:
     > nc2 <- nc %>% rename(area = AREA)
     >
     > # distinct:
     > nc[c(1:100,1:10),] %>% distinct() %>% nrow()
     [1] 100
     >
     > # summarize:
     > nc$area_cl = cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.g <- nc %>% group_by(area_cl)
     > nc.g %>% summarise(mean(AREA))
     Simple feature collection with 4 features and 2 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     # A tibble: 4 x 3
     area_cl `mean(AREA)` geometry
     <fctr> <dbl> <simple_feature>
     1 (0,0.1] 0.07602857 <MULTIPOLYGON...>
     2 (0.1,0.12] 0.11206667 <MULTIPOLYGON...>
     3 (0.12,0.15] 0.13422727 <MULTIPOLYGON...>
     4 (0.15,0.25] 0.19039286 <MULTIPOLYGON...>
     > nc.g %>% summarize(mean(AREA)) %>% plot(col = 3:6/7)
     >
     > library(tidyr)
     >
     > # time-wide to long table, using tidyr::gather
     > # stack the two SID columns for the July 1, 1974 - June 30, 1978 and July 1, 1979 - June 30, 1984 periods
     > # (see https://cran.r-project.org/web/packages/spdep/vignettes/sids.pdf)
     > nc %>% select(SID74, SID79, geometry) %>% gather(VAR, SID, -geometry) %>% summary()
     VAR SID geometry
     Length:200 Min. : 0.000 MULTIPOLYGON :200
     Class :character 1st Qu.: 2.000 epsg:4267 : 0
     Mode :character Median : 5.000 +proj=long...: 0
     Mean : 7.515
     3rd Qu.: 9.000
     Max. :57.000
     >
     > # spread:
     > nc$row = 1:100
     > nc.g <- nc %>% select(SID74, SID79, row) %>% gather(VAR, SID, -row, -geometry)
     > nc.g %>% tail()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -79.0745 ymin: 33.88199 xmax: -76.2877 ymax: 35.01666
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row VAR SID geometry
     195 95 SID79 4 MULTIPOLYGON(((-77.14895629...
     196 96 SID79 5 MULTIPOLYGON(((-78.26149749...
     197 97 SID79 3 MULTIPOLYGON(((-78.02592468...
     198 98 SID79 17 MULTIPOLYGON(((-78.65571594...
     199 99 SID79 9 MULTIPOLYGON(((-77.96073150...
     200 100 SID79 6 MULTIPOLYGON(((-78.65571594...
     > nc.g %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     > nc %>% select(SID74, SID79, geometry, row) %>% gather(VAR, SID, -geometry, -row) %>% spread(VAR, SID) %>% head()
     Simple feature collection with 6 features and 3 fields
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: -81.74107 ymin: 36.07282 xmax: -75.77316 ymax: 36.58965
     epsg (SRID): 4267
     proj4string: +proj=longlat +datum=NAD27 +no_defs
     row SID74 SID79 geometry
     1 1 1 0 MULTIPOLYGON(((-81.47275543...
     2 2 0 3 MULTIPOLYGON(((-81.23989105...
     3 3 5 6 MULTIPOLYGON(((-80.45634460...
     4 4 1 2 MULTIPOLYGON(((-76.00897216...
     5 5 9 3 MULTIPOLYGON(((-77.21766662...
     6 6 7 5 MULTIPOLYGON(((-76.74506378...
     >
     > # test st_set_crs in pipe:
     > sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
     > x <- sfc %>% st_set_crs(4326) %>% st_transform(3857)
     > x
     Geometry set for 2 features
     geometry type: POINT
     dimension: XY
     bbox: xmin: 0 ymin: -7.081155e-10 xmax: 111319.5 ymax: 111325.1
     epsg (SRID): 3857
     proj4string: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
     POINT(0 -7.08115455161362e-10)
     POINT(111319.490793274 111325.142866385)
     >
     > library(units)
     > person = make_unit("person")
     > nc = st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
     > nc.merc <- st_transform(nc, 32119) # NC State Plane
     >
     > nc.merc <- nc.merc %>% mutate(area = st_area(nc.merc), dens = BIR74 * person /area)
     >
     > # summary(nc.merc$dens) # requires units 0.4-2
     > nc.merc$area_cl <- cut(nc$AREA, c(0, .1, .12, .15, .25))
     > nc.grp <- nc.merc %>% group_by(area_cl)
     >
     > out <- nc.grp %>% summarise(A = sum(area), pop = sum(dens * area),
     + new_dens = sum(dens * area)/sum(area))
     >
     > # mean densities depend on grouping:
     > nc.merc %>% summarize(mean(dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     mean(dens) geometry
     1 2.593234e-06 person/m^2 MULTIPOLYGON(((834893.70840...
     > out %>% summarise(mean(new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `mean(new_dens)` geometry
     <units> <simple_feature>
     1 2.589362e-06 person/m^2 <MULTIPOLYGON...>
     >
     > # total densities don't:
     > nc.merc %>% summarise(sum(area * dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     sum(area * dens) geometry
     1 329962 person MULTIPOLYGON(((834893.70840...
     > out %>% summarise(sum(A * new_dens))
     Simple feature collection with 1 feature and 1 field
     geometry type: MULTIPOLYGON
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
Flavor: r-release-linux-x86_64

Version: 0.5-0
Check: running tests for arch ‘i386’
Result: ERROR
     Running 'cast.R' [1s]
     Comparing 'cast.Rout' to 'cast.Rout.save' ...4c4
    < Linking to GEOS 3.5.0, GDAL 2.1.1, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running 'crs.R' [1s]
     Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
     Running 'dist.R' [2s]
     Comparing 'dist.Rout' to 'dist.Rout.save' ...38,41c38,41
    < [1,] 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 -5.820766e-11
    < [2,] 2.328306e-10 0.000000e+00 0.000000e+00 8.731149e-11 0.000000e+00
    < [3,] 2.328306e-10 0.000000e+00 0.000000e+00 2.910383e-11 0.000000e+00
    < [4,] 0.000000e+00 8.731149e-11 2.910383e-11 0.000000e+00 -1.455192e-11
    ---
    > [1,] -2.328306e-10 0.000000e+00 0.000000e+00 0.000000e+00 0
    > [2,] 2.328306e-10 0.000000e+00 0.000000e+00 2.910383e-11 0
    > [3,] 0.000000e+00 0.000000e+00 0.000000e+00 1.455192e-11 0
    > [4,] 0.000000e+00 2.910383e-11 1.455192e-11 0.000000e+00 0
    50,53c50,53
    < [1,] 0.000000e+00 0 0 0 0
    < [2,] 0.000000e+00 0 0 0 0
    < [3,] -1.776357e-15 0 0 0 0
    < [4,] 0.000000e+00 0 0 0 0
    ---
    > [1,] 0 0 0 0 0
    > [2,] 0 0 0 0 0
    > [3,] 0 0 0 0 0
    > [4,] 0 0 0 0 0
     Running 'dplyr.R' [4s]
    Running the tests in 'tests/dplyr.R' failed.
    Last 13 lines of output:
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.5-0
Check: running tests for arch ‘x64’
Result: ERROR
     Running 'cast.R' [1s]
     Comparing 'cast.Rout' to 'cast.Rout.save' ...4c4
    < Linking to GEOS 3.5.0, GDAL 2.1.1, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running 'crs.R' [1s]
     Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
     Running 'dist.R' [2s]
     Comparing 'dist.Rout' to 'dist.Rout.save' ... OK
     Running 'dplyr.R' [4s]
    Running the tests in 'tests/dplyr.R' failed.
    Last 13 lines of output:
     dimension: XY
     bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     epsg (SRID): 32119
     proj4string: +proj=lcc +lat_1=36.16666666666666 +lat_2=34.33333333333334 +lat_0=33.75 +lon_0=-79 +x_0=609601.22 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
     # A tibble: 1 x 2
     `sum(A * new_dens)` geometry
     <units> <simple_feature>
     1 329962 person <MULTIPOLYGON...>
     >
     > conn = system.file("gpkg/nc.gpkg", package = "sf")
     > db = src_sqlite(conn)
     > tbl(db, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
     Error in st_sf(.) : no simple features geometry column present
     Calls: %>% ... _fseq -> freduce -> withVisible -> <Anonymous> -> st_sf
     Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.5-0
Check: package dependencies
Result: NOTE
    Packages suggested but not available for checking: ‘dbplyr’ ‘RPostgreSQL’
Flavor: r-release-osx-x86_64

Version: 0.5-0
Check: tests
Result: ERROR
     Running ‘cast.R’ [1s/1s]
     Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ...4c4
    < Linking to GEOS 3.6.1, GDAL 2.1.3, proj.4 4.9.3
    ---
    > Linking to GEOS 3.5.1, GDAL 2.1.3, proj.4 4.9.2
     Running ‘crs.R’ [1s/1s]
     Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ... OK
     Running ‘dist.R’ [2s/2s]
     Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ... OK
     Running ‘dplyr.R’ [3s/3s]
     Comparing ‘dplyr.Rout’ to ‘dplyr.Rout.save’ ...174c174
    < bbox: xmin: 123821.3 ymin: 14725.47 xmax: 930486.5 ymax: 318247.1
    ---
    > bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
    178c178
    < 1 2.593288e-06 person/m^2 MULTIPOLYGON(((834861.64919...
    ---
    > 1 2.593234e-06 person/m^2 MULTIPOLYGON(((834893.70840...
    183c183
    < bbox: xmin: 123821.3 ymin: 14725.47 xmax: 930486.5 ymax: 318247.1
    ---
    > bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
    189c189
    < 1 2.589426e-06 person/m^2 <MULTIPOLYGON...>
    ---
    > 1 2.589362e-06 person/m^2 <MULTIPOLYGON...>
    196c196
    < bbox: xmin: 123821.3 ymin: 14725.47 xmax: 930486.5 ymax: 318247.1
    ---
    > bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
    200c200
    < 1 329962 person MULTIPOLYGON(((834861.64919...
    ---
    > 1 329962 person MULTIPOLYGON(((834893.70840...
    205c205
    < bbox: xmin: 123821.3 ymin: 14725.47 xmax: 930486.5 ymax: 318247.1
    ---
    > bbox: xmin: 123829 ymin: 14744.69 xmax: 930521.8 ymax: 318259.9
     Running ‘empty.R’ [1s/1s]
     Comparing ‘empty.Rout’ to ‘empty.Rout.save’ ... OK
     Running ‘gdal_geom.R’ [1s/1s]
     Comparing ‘gdal_geom.Rout’ to ‘gdal_geom.Rout.save’ ...49c49,50
    < c++ exception (unknown reason)
    ---
    > argument dfMaxLength should be positive
    >
    90c91
    < GDAL has 62 drivers
    ---
    > GDAL has 75 drivers
    320,324c321,325
    < [1,] 1760206670 0.114
    < [2,] 946404913 0.061
    < [3,] 2202193524 0.143
    < [4,] 1074319119 0.070
    < [5,] 2352497674 0.153
    ---
    > [1,] 1760244757 0.114
    > [2,] 946435667 0.061
    > [3,] 2202248253 0.143
    > [4,] 1074351919 0.070
    > [5,] 2352539533 0.153
     Running ‘geos.R’ [6s/6s]
     Comparing ‘geos.Rout’ to ‘geos.Rout.save’ ...13,22c13,22
    < [1,] 0.00 0.00 25651.23 440548.35 299763.40 361518.98 419659.16
    < [2,] 0.00 0.00 0.00 409417.17 268936.99 332580.77 388533.95
    < [3,] 25651.23 0.00 0.00 367545.52 227011.59 290289.44 346658.76
    < [4,] 440548.35 409417.17 367545.52 0.00 67224.91 45537.03 0.00
    < [5,] 299763.40 268936.99 227011.59 67224.91 0.00 0.00 46526.24
    < [6,] 361518.98 332580.77 290289.44 45537.03 0.00 0.00 30213.02
    < [7,] 419659.16 388533.95 346658.76 0.00 46526.24 30213.02 0.00
    < [8,] 384581.80 354284.50 312342.45 16129.81 11926.53 0.00 0.00
    < [9,] 262346.17 231210.79 189305.05 140451.78 0.00 64604.34 119560.43
    < [10,] 71136.41 41942.45 0.00 330742.68 190177.73 252365.75 309854.06
    ---
    > [1,] 0.00 0.00 25652.53 440561.15 299772.18 361529.53 419671.2
    > [2,] 0.00 0.00 0.00 409428.54 268944.31 332589.77 388544.5
    > [3,] 25652.53 0.00 0.00 367555.48 227017.51 290297.10 346667.9
    > [4,] 440561.15 409428.54 367555.48 0.00 67226.86 45537.55 0.0
    > [5,] 299772.18 268944.31 227017.51 67226.86 0.00 0.00 46527.4
    > [6,] 361529.53 332589.77 290297.10 45537.55 0.00 0.00 30213.0
    > [7,] 419671.16 388544.52 346667.93 0.00 46527.40 30213.00 0.0
    > [8,] 384592.90 354294.11 312350.68 16130.34 11926.81 0.00 0.0
    > [9,] 262354.29 231217.49 189310.35 140455.87 0.00 64606.24 119563.7
    > [10,] 71139.29 41943.83 0.00 330751.39 190182.39 252372.06 309862.0
    24,33c24,33
    < [1,] 384581.80 262346.17 71136.41
    < [2,] 354284.50 231210.79 41942.45
    < [3,] 312342.45 189305.05 0.00
    < [4,] 16129.81 140451.78 330742.68
    < [5,] 11926.53 0.00 190177.73
    < [6,] 0.00 64604.34 252365.75
    < [7,] 0.00 119560.43 309854.06
    < [8,] 0.00 85530.83 275382.84
    < [9,] 85530.83 0.00 152484.88
    < [10,] 275382.84 152484.88 0.00
    ---
    > [1,] 384592.90 262354.29 71139.29
    > [2,] 354294.11 231217.49 41943.83
    > [3,] 312350.68 189310.35 0.00
    > [4,] 16130.34 140455.87 330751.39
    > [5,] 11926.81 0.00 190182.39
    > [6,] 0.00 64606.24 252372.06
    > [7,] 0.00 119563.73 309861.97
    > [8,] 0.00 85533.12 275389.78
    > [9,] 85533.12 0.00 152488.92
    > [10,] 275389.78 152488.92 0.00
     Running ‘graticule.R’ [2s/2s]
     Comparing ‘graticule.Rout’ to ‘graticule.Rout.save’ ... OK
     Running ‘grid.R’ [2s/2s]
     Comparing ‘grid.Rout’ to ‘grid.Rout.save’ ... OK
     Running ‘plot.R’ [12s/12s]
     Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
     Running ‘read.R’ [2s/2s]
     Comparing ‘read.Rout’ to ‘read.Rout.save’ ...48a49,86
    > Driver: OSM
    > Available layers:
    > layer_name geometry_type features fields
    > 1 points Point NA 10
    > 2 lines Line String NA 9
    > 3 multilinestrings Multi Line String NA 4
    > 4 multipolygons Multi Polygon NA 25
    > 5 other_relations Geometry Collection NA 4
    > Driver: OSM
    > Available layers:
    > layer_name geometry_type features fields
    > 1 points Point 0 10
    > 2 lines Line String 0 9
    > 3 multilinestrings Multi Line String 0 4
    > 4 multipolygons Multi Polygon 3 25
    > 5 other_relations Geometry Collection 0 4
    > Simple feature collection with 3 features and 25 fields
    > geometry type: MULTIPOLYGON
    > dimension: XY
    > bbox: xmin: -1.556254 ymin: 53.79519 xmax: -1.550716 ymax: 53.80341
    > epsg (SRID): 4326
    > proj4string: +proj=longlat +datum=WGS84 +no_defs
    > osm_id osm_way_id name type aeroway amenity admin_level barrier boundary
    > 1 <NA> 263958111 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > 2 <NA> 301461256 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > 3 <NA> 462227487 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > building craft geological historic land_area landuse leisure man_made
    > 1 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
    > 2 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
    > 3 <NA> <NA> <NA> <NA> <NA> <NA> park <NA>
    > military natural office place shop sport tourism other_tags
    > 1 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > 2 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > 3 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
    > geometry
    > 1 MULTIPOLYGON(((-1.5507185 5...
    > 2 MULTIPOLYGON(((-1.5557631 5...
    > 3 MULTIPOLYGON(((-1.551502 53...
    107,108c145,146
    < Error in CPL_get_layers(dsn, options, do_count) :
    < c++ exception (unknown reason)
    ---
    > Error in CPL_get_layers(dsn, options, do_count) : Open failed.
    >
    112c150,151
    < c++ exception (unknown reason)
    ---
    > Open failed.
    >
    116c155,156
    < c++ exception (unknown reason)
    ---
    > Open failed.
    >
    127c167,168
    < c++ exception (unknown reason)
    ---
    > Driver not available.
    >
    223c264
    < Reading layer `a.sqlite' from data source `/Volumes/XT3/Builds/R-dev-web/QA/Simon/packages/el-capitan-x86_64/results/3.4/sf.Rcheck/sf/sqlite/b.sqlite' using driver `SQLite'
    ---
    > Reading layer `a.sqlite' from data source `/home/edzer/git/sf.Rcheck/sf/sqlite/b.sqlite' using driver `SQLite'
    240c281
    < Reading layer `a.sqlite' from data source `/Volumes/XT3/Builds/R-dev-web/QA/Simon/packages/el-capitan-x86_64/results/3.4/sf.Rcheck/sf/sqlite/b.sqlite' using driver `SQLite'
    ---
    > Reading layer `a.sqlite' from data source `/home/edzer/git/sf.Rcheck/sf/sqlite/b.sqlite' using driver `SQLite'
     Running ‘roundtrip.R’ [6s/6s]
     Comparing ‘roundtrip.Rout’ to ‘roundtrip.Rout.save’ ... OK
     Running ‘sfc.R’ [3s/3s]
     Comparing ‘sfc.Rout’ to ‘sfc.Rout.save’ ...359c359
    < bbox: xmin: -10018750 ymin: 4163881 xmax: -8905559 ymax: 4300621
    ---
    > bbox: xmin: -10018760 ymin: 4163894 xmax: -8905533 ymax: 4300640
    362,363c362,363
    < POINT(-10018754.1713946 4163881.14406429)
    < POINT(-8905559.26346189 4300621.37204427)
    ---
    > POINT(-10018764.3099097 4163893.70169306)
    > POINT(-8905532.70139521 4300640.2154045)
    367c367
    < "3.6.1" "2.1.3" "4.9.3"
    ---
    > "3.5.1" "2.1.3" "4.9.2"
     Running ‘sfg.R’ [1s/1s]
     Comparing ‘sfg.Rout’ to ‘sfg.Rout.save’ ... OK
     Running ‘testthat.R’ [8s/9s]
    Running the tests in ‘tests/testthat.R’ failed.
    Last 13 lines of output:
     kml
     shp
     sqlite
     vdv
     xlsx
     .nc
     testthat results ================================================================
     OK: 441 SKIPPED: 12 FAILED: 4
     1. Error: separate and unite work (@test_tidy.R#15)
     2. Failure: Reading of truncated buffers results in a proper error (@test_wkb.R#44)
     3. Failure: Reading of truncated buffers results in a proper error (@test_wkb.R#46)
     4. Failure: Reading of truncated buffers results in a proper error (@test_wkb.R#48)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-release-osx-x86_64