Running ‘aggregate.R’ [2s/3s]
  Comparing ‘aggregate.Rout’ to ‘aggregate.Rout.save’ ...4c4
< Linking to GEOS 3.8.1, GDAL 3.1.2, PROJ 7.1.0
---
> Linking to GEOS 3.8.0, GDAL 3.0.2, PROJ 6.2.1
  Running ‘cast.R’ [1s/2s]
  Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ... OK
  Running ‘crs.R’ [2s/3s]
  Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ... OK
  Running ‘dist.R’ [2s/3s]
  Comparing ‘dist.Rout’ to ‘dist.Rout.save’ ... OK
  Running ‘dplyr.R’ [3s/4s]
  Running ‘empty.R’ [2s/2s]
  Comparing ‘empty.Rout’ to ‘empty.Rout.save’ ... OK
  Running ‘gdal_geom.R’ [2s/3s]
  Comparing ‘gdal_geom.Rout’ to ‘gdal_geom.Rout.save’ ... OK
  Running ‘geos.R’ [9s/12s]
  Comparing ‘geos.Rout’ to ‘geos.Rout.save’ ... OK
  Running ‘graticule.R’ [3s/4s]
  Comparing ‘graticule.Rout’ to ‘graticule.Rout.save’ ...55,73c55,56
< > (wrld2 = st_as_sf(map('world2', plot=FALSE, fill=TRUE )))
< Simple feature collection with 253 features and 1 field
< geometry type:  MULTIPOLYGON
< dimension:      XY
< bbox:           xmin: 0 ymin: -89.99001 xmax: 360 ymax: 83.59961
< geographic CRS: WGS 84
< First 10 features:
<                      ID                           geom
< 1                 Aruba MULTIPOLYGON (((290.1009 12...
< 2           Afghanistan MULTIPOLYGON (((74.89131 37...
< 3                Angola MULTIPOLYGON (((23.9665 -10...
< 4              Anguilla MULTIPOLYGON (((296.9988 18...
< 5               Albania MULTIPOLYGON (((20.06396 42...
< 6               Finland MULTIPOLYGON (((20.61133 60...
< 7               Andorra MULTIPOLYGON (((1.706055 42...
< 8  United Arab Emirates MULTIPOLYGON (((53.92783 24...
< 9             Argentina MULTIPOLYGON (((295.4508 -5...
< 10              Armenia MULTIPOLYGON (((45.55235 40...
< > try(plot(wrld2, graticule = TRUE))
---
> > wrld2 = st_as_sf(map('world2', plot=FALSE, fill=TRUE ))
> > plot(wrld2, graticule = TRUE)
  Running ‘grid.R’ [2s/3s]
  Comparing ‘grid.Rout’ to ‘grid.Rout.save’ ... OK
  Running ‘maps.R’ [3s/4s]
  Comparing ‘maps.Rout’ to ‘maps.Rout.save’ ... OK
  Running ‘plot.R’ [8s/11s]
  Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
  Running ‘read.R’ [3s/4s]
  Comparing ‘read.Rout’ to ‘read.Rout.save’ ...330c330
< Reading layer `tst__' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/sf.Rcheck/tests/tst__.gpkg' using driver `GPKG'
---
> Reading layer `tst__' from data source `/home/edzer/git/sf.Rcheck/tests/tst__.gpkg' using driver `GPKG'
  Running ‘roundtrip.R’ [8s/11s]
  Comparing ‘roundtrip.Rout’ to ‘roundtrip.Rout.save’ ...146c146
< Reading layer `nc.gpkg' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sf/gpkg/nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `/home/edzer/git/sf.Rcheck/sf/gpkg/nc.gpkg' using driver `GPKG'
  Running ‘s2.R’ [2s/4s]
  Running ‘sample.R’ [2s/3s]
  Comparing ‘sample.Rout’ to ‘sample.Rout.save’ ... OK
  Running ‘sfc.R’ [8s/12s]
  Comparing ‘sfc.Rout’ to ‘sfc.Rout.save’ ...335c335
< "3.8.1" "3.1.2" "7.1.0" 
---
> "3.8.0" "3.0.4" "7.0.0" 
568,570c568,570
< 1  1 5 b POINT (0 0)
< 2  2 6 c POINT (1 1)
< 3 NA 2 a POINT EMPTY
---
> 1 NA 2 a POINT EMPTY
> 2  1 5 b POINT (0 0)
> 3  2 6 c POINT (1 1)
641c641
< Reading layer `nc' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/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'
710a711
> although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar
729,731c730,745
< > #FIXME:
< > # if (sf_extSoftVersion()["proj.4"] >= "4.9.0") # lwgeom breaks on this
< > #   (p <- st_sample(x, 10))
---
> > if (sf_extSoftVersion()["proj.4"] >= "4.9.0") # lwgeom breaks on this
> +   (p <- st_sample(x, 10))
> although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar
> although coordinates are longitude/latitude, st_intersects assumes that they are planar
> although coordinates are longitude/latitude, st_intersects assumes that they are planar
> Geometry set for 10 features 
> geometry type:  POINT
> dimension:      XY
> bbox:           xmin: -148.196 ymin: -51.7878 xmax: 164.644 ymax: 79.4122
> geographic CRS: WGS 84
> First 5 geometries:
> POINT (-148.196 72.3139)
> POINT (143.075 54.9954)
> POINT (-143.112 25.5397)
> POINT (-89.2235 -18.4014)
> POINT (-104.569 79.4122)
737c751
< bbox:           xmin: 41.0557 ymin: 27.8024 xmax: 80.9558 ymax: 65.5424
---
> bbox:           xmin: -112.989 ymin: -51.7878 xmax: 53.2886 ymax: 79.4122
739c753
< MULTIPOINT ((57.2118 52.329), (80.9558 65.5424)...
---
> MULTIPOINT ((-104.569 79.4122), (-112.989 30.33...
750c764
< bbox:           xmin: 0 ymin: 0 xmax: 0.0914728 ymax: 1
---
> bbox:           xmin: 0 ymin: 0 xmax: 0.0875734 ymax: 1
752,754c766,768
< MULTIPOINT ((0 0.302591), (0 0.251439), (0 0.22...
< MULTIPOINT ((0.0914728 0), (0.073852 0), (0.003...
< MULTIPOINT ((0.0488222 1), (0.0716508 1), (0.08...
---
> MULTIPOINT ((0 0.40852), (0 0.415459), (0 0.999...
> MULTIPOINT ((0.00320272 0), (0.0642832 0), (0.0...
> MULTIPOINT ((0.0147658 1), (0.0201495 1), (0.04...
760c774
< bbox:           xmin: 1215230 ymin: 935867 xmax: 1428880 ymax: 1031900
---
> bbox:           xmin: 1200740 ymin: 942550 xmax: 1425790 ymax: 1036860
763,767c777,781
< POINT (1215227 1031901)
< POINT (1271918 979879)
< POINT (1264558 935867)
< POINT (1256623 949384)
< POINT (1222665 972639)
---
> POINT (1228809 1011255)
> POINT (1233859 956721)
> POINT (1260039 1007661)
> POINT (1271553 1021505)
> POINT (1222552 980314)
775c789
< bbox:           xmin: -81.6893 ymin: 36.2492 xmax: -80.914 ymax: 36.583
---
> bbox:           xmin: -81.7408 ymin: 36.2735 xmax: -80.9188 ymax: 36.5821
777,778c791,792
< MULTIPOINT ((-81.3189 36.4974), (-81.4017 36.57...
< MULTIPOINT ((-80.9809 36.3787), (-81.1251 36.42...
---
> MULTIPOINT ((-81.3308 36.5204), (-81.5205 36.58...
> MULTIPOINT ((-81.3127 36.4804), (-81.2655 36.43...
783c797
< bbox:           xmin: 0 ymin: 0 xmax: 0.0967604 ymax: 1
---
> bbox:           xmin: 0 ymin: 0 xmax: 0.0987443 ymax: 1
785,787c799,801
< MULTIPOINT ((0 0.00175127), (0 0.0167514), (0 0...
< MULTIPOINT ((0.00675965 0), (0.0217598 0), (0.0...
< MULTIPOINT ((0.0117605 1), (0.0267606 1), (0.04...
---
> MULTIPOINT ((0 0.00373519), (0 0.0187353), (0 0...
> MULTIPOINT ((0.00874356 0), (0.0237437 0), (0.0...
> MULTIPOINT ((0.0137444 1), (0.0287446 1), (0.04...
791c805
<  [1] 103 107 109  97  97 119  87 106 103 100
---
>  [1] 106 107 111  92  95 122  86 105 105 101
801,807d814
< New names:
< * AREA -> AREA...1
< * PERIMETER -> PERIMETER...2
< * CNTY_ -> CNTY_...3
< * AREA -> AREA...16
< * PERIMETER -> PERIMETER...17
< * ...
837c844
< bbox:           xmin: -0.0070472 ymin: 1.09548 xmax: -0.0070472 ymax: 1.09548
---
> bbox:           xmin: 0.0102133 ymin: 1.06372 xmax: 0.0102133 ymax: 1.06372
839c846
< POINT (-0.0070472 1.09548)
---
> POINT (0.0102133 1.06372)
844,846d850
< Warning message:
< In showSRID(uprojargs, format = "PROJ", multiline = "NO") :
<   Discarded datum Amersfoort in CRS definition
  Running ‘sfg.R’ [1s/2s]
  Comparing ‘sfg.Rout’ to ‘sfg.Rout.save’ ... OK
  Running ‘spatstat.R’ [4s/6s]
  Comparing ‘spatstat.Rout’ to ‘spatstat.Rout.save’ ...35,44c35,44
< 1  window  <NA>   <NA>       <NA> POLYGON ((584712 674237.1, ...
< 2   point major    dry 2006-01-06      POINT (582518.4 676886.2)
< 3   point major    dry 2006-01-10        POINT (581823 677422.7)
< 4   point major    dry 2006-01-15        POINT (582131 676937.9)
< 5   point major    dry 2006-01-24        POINT (582111.9 677420)
< 6   point minor    dry 2006-01-27      POINT (582585.1 677509.7)
< 7   point major    dry 2006-01-28      POINT (582302.3 677521.6)
< 8   point major    dry 2006-02-01      POINT (583167.2 676730.5)
< 9   point major    dry 2006-02-03      POINT (583584.5 677207.1)
< 10  point major    dry 2006-02-13      POINT (583117.8 676850.3)
---
> NA window  <NA>   <NA>       <NA> POLYGON ((584712 674237.1, ...
> 1   point major    dry 2006-01-06      POINT (582518.4 676886.2)
> 2   point major    dry 2006-01-10        POINT (581823 677422.7)
> 3   point major    dry 2006-01-15        POINT (582131 676937.9)
> 4   point major    dry 2006-01-24        POINT (582111.9 677420)
> 5   point minor    dry 2006-01-27      POINT (582585.1 677509.7)
> 6   point major    dry 2006-01-28      POINT (582302.3 677521.6)
> 7   point major    dry 2006-02-01      POINT (583167.2 676730.5)
> 8   point major    dry 2006-02-03      POINT (583584.5 677207.1)
> 9   point major    dry 2006-02-13      POINT (583117.8 676850.3)
198c198
< Reading layer `nc.gpkg' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sf/gpkg/nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `/home/edzer/git/sf.Rcheck/sf/gpkg/nc.gpkg' using driver `GPKG'
  Running ‘stars.R’ [3s/5s]
  Comparing ‘stars.Rout’ to ‘stars.Rout.save’ ...125c125
< Reading layer `nc.gpkg' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sf/gpkg/nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `/home/edzer/git/sf.Rcheck/sf/gpkg/nc.gpkg' using driver `GPKG'
  Running ‘testthat.R’ [10s/17s]
  Running ‘units.R’ [2s/3s]
  Comparing ‘units.Rout’ to ‘units.Rout.save’ ... OK
  Running ‘wkb.R’ [1s/3s]
  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
  
  > options(dplyr.summarise.inform=FALSE)
  > read_sf(system.file("shape/nc.shp", package="sf"), quiet = TRUE) %>%
  + 	st_transform(3857) -> nc
  > 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"         "tbl_df"     "tbl"        "data.frame"
  > nc %>% select(SID74, SID79, geometry) %>% class()
  [1] "sf"         "tbl_df"     "tbl"        "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"         "tbl_df"     "tbl"        "data.frame"
  > nc %>% transmute(AREA = AREA/10) %>% class()
  [1] "sf"         "tbl_df"     "tbl"        "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: -9386880 ymin: 4012991 xmax: -8399788 ymax: 4382079
  projected CRS:  WGS 84 / Pseudo-Mercator
  # A tibble: 4 x 3
    area_cl    `mean(AREA)`                                               geometry
    <fct>             <dbl>                                     <MULTIPOLYGON [m]>
  1 (0,0.1]          0.0760 (((-8678517 4054264, -8679088 4061405, -8680136 40615…
  2 (0.1,0.12]       0.112  (((-9383227 4192541, -9375980 4199500, -9370835 41966…
  3 (0.12,0.1…       0.134  (((-8520830 4108031, -8522040 4111119, -8520104 41115…
  4 (0.15,0.2…       0.190  (((-8685774 4073056, -8684147 4070879, -8683670 40671…
  > nc.g %>% summarize(mean(AREA)) %>% plot(col = 3:6/7)
  > 
  > library(tidyr)
  Error in library(tidyr) : there is no package called 'tidyr'
  Execution halted
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > suppressPackageStartupMessages(library(sf))
  > 
  > test_check("sf")
  Coordinate Reference System:
    User input: EPSG:4326 
    wkt:
  GEOGCRS["WGS 84",
      DATUM["World Geodetic System 1984",
          ELLIPSOID["WGS 84",6378137,298.257223563,
              LENGTHUNIT["metre",1]]],
      PRIMEM["Greenwich",0,
          ANGLEUNIT["degree",0.0174532925199433]],
      CS[ellipsoidal,2],
          AXIS["geodetic latitude (Lat)",north,
              ORDER[1],
              ANGLEUNIT["degree",0.0174532925199433]],
          AXIS["geodetic longitude (Lon)",east,
              ORDER[2],
              ANGLEUNIT["degree",0.0174532925199433]],
      USAGE[
          SCOPE["unknown"],
          AREA["World"],
          BBOX[-90,-180,90,180]],
      ID["EPSG",4326]]
  Coordinate Reference System:
    No user input
    wkt:
  GEOGCRS["WGS 84",
      DATUM["World Geodetic System 1984",
          ELLIPSOID["WGS 84",6378137,298.257223563,
              LENGTHUNIT["metre",1]]],
      PRIMEM["Greenwich",0,
          ANGLEUNIT["degree",0.0174532925199433]],
      CS[ellipsoidal,2],
          AXIS["geodetic latitude (Lat)",north,
              ORDER[1],
              ANGLEUNIT["degree",0.0174532925199433]],
          AXIS["geodetic longitude (Lon)",east,
              ORDER[2],
              ANGLEUNIT["degree",0.0174532925199433]],
      USAGE[
          SCOPE["unknown"],
          AREA["World"],
          BBOX[-90,-180,90,180]],
      ID["EPSG",4326]]
  Cannot open layer foo
  Reading layer `nospatial' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sf/gpkg/nospatial.gpkg' using driver `GPKG'
  Reading layer `nospatial' from data source `/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/sf/gpkg/nospatial.gpkg' using driver `GPKG'
  OGR: Unsupported geometry type
  ── 1. Error: (unknown) (@test_tidy.R#23)  ──────────────────────────────────────
  there is no package called 'tidyr'
  Backtrace:
   1. base::suppressMessages(library(tidyr))
   3. base::library(tidyr)
  
  Failed to create feature 1 in x
  Failed to create feature 1 in x
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 695 | SKIPPED: 60 | WARNINGS: 12 | FAILED: 1 ]
  1. Error: (unknown) (@test_tidy.R#23) 
  
  Error: testthat unit tests failed
  Execution halted