Running ‘aggregate.R’
  Comparing ‘aggregate.Rout’ to ‘aggregate.Rout.save’ ...4c4
< Linking to GEOS 3.7.1, GDAL 2.3.2, PROJ 5.2.0
---
> Linking to GEOS 3.7.0, GDAL 2.4.0, PROJ 5.2.0
  Running ‘cast.R’
  Comparing ‘cast.Rout’ to ‘cast.Rout.save’ ... OK
  Running ‘crs.R’
  Comparing ‘crs.Rout’ to ‘crs.Rout.save’ ...93a94,97
> Error in CPL_proj_direct(as.character(c(from[1], to[1])), as.matrix(pts)) : 
>   unknown projection id
> Error in CPL_proj_direct(as.character(c(from[1], to[1])), as.matrix(pts)) : 
>   unknown projection id
  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’ ...108c108
< GDAL has 85 drivers
---
> GDAL has 88 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’
  Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
  Running ‘read.R’
  Comparing ‘read.Rout’ to ‘read.Rout.save’ ...330c330
< Reading layer `Parcely' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/gml/20170930_OB_530964_UKSH.xml.gz' using driver `GML'
---
> Reading layer `Parcely' from data source `/home/edzer/git/sf.Rcheck/sf/gml/20170930_OB_530964_UKSH.xml.gz' using driver `GML'
348c348
< Reading layer `Parcely' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/gml/20170930_OB_530964_UKSH.xml.gz' using driver `GML'
---
> Reading layer `Parcely' from data source `/home/edzer/git/sf.Rcheck/sf/gml/20170930_OB_530964_UKSH.xml.gz' using driver `GML'
380c380
< Reading layer `tst__' from data source `/data/gannet/ripley/R/packages/tests-devel/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’
  Comparing ‘roundtrip.Rout’ to ‘roundtrip.Rout.save’ ... OK
  Running ‘sfc.R’
  Comparing ‘sfc.Rout’ to ‘sfc.Rout.save’ ...388c388
< "3.7.1" "2.3.2" "5.2.0" 
---
> "3.7.0" "2.4.0" "5.2.0" 
713c713
< 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'
  Running ‘sfg.R’
  Comparing ‘sfg.Rout’ to ‘sfg.Rout.save’ ... OK
  Running ‘stars.R’
  Comparing ‘stars.Rout’ to ‘stars.Rout.save’ ...121c121
< Reading layer `nc.gpkg' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/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'
138c138
<  NA's   :30726  
---
>  NA's   :30904  
141,143c141,143
< x    1 360 -84.3239  0.0246302 +proj=longlat +datum=NAD2... FALSE   NULL [x]
< y    1 180  36.5896 -0.0150425 +proj=longlat +datum=NAD2... FALSE   NULL [y]
< Simple feature collection with 34074 features and 1 field
---
> x    1 461 -84.3239  0.0192484 +proj=longlat +datum=NAD2... FALSE   NULL [x]
> y    1 141  36.5896 -0.0192484 +proj=longlat +datum=NAD2... FALSE   NULL [y]
> Simple feature collection with 34097 features and 1 field
146c146
< bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
---
> bbox:           xmin: -84.32385 ymin: 33.87563 xmax: -75.45034 ymax: 36.58965
151,161c151,161
< 1  0.114 POLYGON ((-81.66379 36.5896...
< 2  0.114 POLYGON ((-81.63916 36.5896...
< 3  0.114 POLYGON ((-81.61453 36.5896...
< 4  0.114 POLYGON ((-81.5899 36.58965...
< 5  0.114 POLYGON ((-81.56527 36.5896...
< 6  0.114 POLYGON ((-81.54064 36.5896...
< 7  0.114 POLYGON ((-81.68842 36.5746...
< 8  0.114 POLYGON ((-81.66379 36.5746...
< 9  0.114 POLYGON ((-81.63916 36.5746...
< 10 0.114 POLYGON ((-81.61453 36.5746...
< Simple feature collection with 34074 features and 1 field
---
> 1  0.114 POLYGON ((-81.66757 36.5896...
> 2  0.114 POLYGON ((-81.64833 36.5896...
> 3  0.114 POLYGON ((-81.62908 36.5896...
> 4  0.114 POLYGON ((-81.60983 36.5896...
> 5  0.114 POLYGON ((-81.59058 36.5896...
> 6  0.114 POLYGON ((-81.57133 36.5896...
> 7  0.114 POLYGON ((-81.55208 36.5896...
> 8  0.114 POLYGON ((-81.53283 36.5896...
> 9  0.114 POLYGON ((-81.51359 36.5896...
> 10 0.114 POLYGON ((-81.49434 36.5896...
> Simple feature collection with 34097 features and 1 field
164c164
< bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
---
> bbox:           xmin: -84.32385 ymin: 33.87563 xmax: -75.45034 ymax: 36.58965
169,179c169,179
< 1  0.114 POLYGON ((-81.66379 36.5896...
< 2  0.114 POLYGON ((-81.63916 36.5896...
< 3  0.114 POLYGON ((-81.61453 36.5896...
< 4  0.114 POLYGON ((-81.5899 36.58965...
< 5  0.114 POLYGON ((-81.56527 36.5896...
< 6  0.114 POLYGON ((-81.54064 36.5896...
< 7  0.114 POLYGON ((-81.68842 36.5746...
< 8  0.114 POLYGON ((-81.66379 36.5746...
< 9  0.114 POLYGON ((-81.63916 36.5746...
< 10 0.114 POLYGON ((-81.61453 36.5746...
< Simple feature collection with 34074 features and 1 field
---
> 1  0.114 POLYGON ((-81.66757 36.5896...
> 2  0.114 POLYGON ((-81.64833 36.5896...
> 3  0.114 POLYGON ((-81.62908 36.5896...
> 4  0.114 POLYGON ((-81.60983 36.5896...
> 5  0.114 POLYGON ((-81.59058 36.5896...
> 6  0.114 POLYGON ((-81.57133 36.5896...
> 7  0.114 POLYGON ((-81.55208 36.5896...
> 8  0.114 POLYGON ((-81.53283 36.5896...
> 9  0.114 POLYGON ((-81.51359 36.5896...
> 10 0.114 POLYGON ((-81.49434 36.5896...
> Simple feature collection with 34097 features and 1 field
182c182
< bbox:           xmin: -84.31154 ymin: 33.88951 xmax: -75.46929 ymax: 36.58213
---
> bbox:           xmin: -84.31423 ymin: 33.88525 xmax: -75.45997 ymax: 36.58003
187,200c187,196
< 1  0.114 POINT (-81.65148 36.58213)
< 2  0.114 POINT (-81.62684 36.58213)
< 3  0.114 POINT (-81.60221 36.58213)
< 4  0.114 POINT (-81.57758 36.58213)
< 5  0.114 POINT (-81.55295 36.58213)
< 6  0.114 POINT (-81.52832 36.58213)
< 7  0.114 POINT (-81.67611 36.56709)
< 8  0.114 POINT (-81.65148 36.56709)
< 9  0.114 POINT (-81.62684 36.56709)
< 10 0.114 POINT (-81.60221 36.56709)
< ================================================================================
< ================================================================================
< ================================================================================
< ================================================================================
---
> 1  0.114 POINT (-81.65795 36.58003)
> 2  0.114  POINT (-81.6387 36.58003)
> 3  0.114 POINT (-81.61945 36.58003)
> 4  0.114  POINT (-81.6002 36.58003)
> 5  0.114 POINT (-81.58096 36.58003)
> 6  0.114 POINT (-81.56171 36.58003)
> 7  0.114 POINT (-81.54246 36.58003)
> 8  0.114 POINT (-81.52321 36.58003)
> 9  0.114 POINT (-81.50396 36.58003)
> 10 0.114 POINT (-81.48471 36.58003)
  Running ‘testthat.R’
  Running ‘units.R’
  Comparing ‘units.Rout’ to ‘units.Rout.save’ ... OK
  Running ‘wkb.R’
  Comparing ‘wkb.Rout’ to ‘wkb.Rout.save’ ... OK
  Running ‘zzz.R’
  Comparing ‘zzz.Rout’ to ‘zzz.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
  * <fct>             <dbl>                                     <MULTIPOLYGON [°]>
  1 (0,0.1]          0.0760 (((-77.96073 34.18924, -77.96587 34.24229, -77.97528 …
  2 (0.1,0.12]       0.112  (((-84.29104 35.21054, -84.22594 35.2616, -84.17973 3…
  3 (0.12,0.1…       0.134  (((-76.54427 34.58783, -76.55515 34.61066, -76.53775 …
  4 (0.15,0.2…       0.190  (((-76.64705 34.90633, -76.62562 34.89065, -76.75021 …
  > 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.14896 3...
  196  96 SID79   5 MULTIPOLYGON (((-78.2615 34...
  197  97 SID79   3 MULTIPOLYGON (((-78.02592 3...
  198  98 SID79  17 MULTIPOLYGON (((-78.65572 3...
  199  99 SID79   9 MULTIPOLYGON (((-77.96073 3...
  200 100 SID79   6 MULTIPOLYGON (((-78.65572 3...
  > 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.47276 3...
  2   2     0     3 MULTIPOLYGON (((-81.23989 3...
  3   3     5     6 MULTIPOLYGON (((-80.45634 3...
  4   4     1     2 MULTIPOLYGON (((-76.00897 3...
  5   5     9     3 MULTIPOLYGON (((-77.21767 3...
  6   6     7     5 MULTIPOLYGON (((-76.74506 3...
  > 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.47276 3...
  2   2     0     3 MULTIPOLYGON (((-81.23989 3...
  3   3     5     6 MULTIPOLYGON (((-80.45634 3...
  4   4     1     2 MULTIPOLYGON (((-76.00897 3...
  5   5     9     3 MULTIPOLYGON (((-77.21767 3...
  6   6     7     5 MULTIPOLYGON (((-76.74506 3...
  > 
  > # 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: 0 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 0)
  POINT (111319.5 111325.1)
  > 
  > nc = st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
  > nc.merc <- st_transform(nc, 32119) # NC State Plane
  > suppressPackageStartupMessages(library(units))
  > install_symbolic_unit("person")
  > person = as_units("person")
  > 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.7 95...
  > 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
  *     [person/m^2]                                            <MULTIPOLYGON [m]>
  1     2.589362e-06 (((834893.7 95747.49, 833834.2 98254.6, 835420.2 98655.72, 8…
  > 
  > # 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.7 95...
  > 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
  *           [person]                                          <MULTIPOLYGON [m]>
  1             329962 (((834893.7 95747.49, 833834.2 98254.6, 835420.2 98655.72,…
  > 
  > conn = system.file("gpkg/nc.gpkg", package = "sf")
  > 
  > library(DBI)
  > library(RSQLite)
  > con = dbConnect(SQLite(), dbname = system.file("gpkg/nc.gpkg", package = "sf"))
  > dbReadTable(con, "nc.gpkg") %>% filter(AREA > 0.2) %>% collect %>% st_sf
  Simple feature collection with 11 features and 15 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -80.06441 ymin: 33.88199 xmax: -76.49254 ymax: 36.06665
  epsg (SRID):    NA
  proj4string:    NA
  First 10 features:
     fid  AREA PERIMETER CNTY_ CNTY_ID     NAME  FIPS FIPSNO CRESS_ID BIR74 SID74
  1   37 0.219     2.130  1938    1938     Wake 37183  37183       92 14484    16
  2   47 0.201     1.805  1968    1968 Randolph 37151  37151       76  4456     7
  3   54 0.207     1.851  1989    1989 Johnston 37101  37101       51  3999     6
  4   57 0.203     3.197  2004    2004 Beaufort 37013  37013        7  2692     7
  5   79 0.241     2.214  2083    2083  Sampson 37163  37163       82  3025     4
  6   88 0.204     1.871  2100    2100   Duplin 37061  37061       31  2483     4
  7   94 0.240     2.004  2150    2150  Robeson 37155  37155       78  7889    31
  8   96 0.225     2.107  2162    2162   Bladen 37017  37017        9  1782     8
  9   97 0.214     2.152  2185    2185   Pender 37141  37141       71  1228     4
  10  98 0.240     2.365  2232    2232 Columbus 37047  37047       24  3350    15
     NWBIR74 BIR79 SID79 NWBIR79                           geom
  1     4397 20857    31    6221 MULTIPOLYGON (((-78.92107 3...
  2      384  5711    12     483 MULTIPOLYGON (((-79.76499 3...
  3     1165  4780    13    1349 MULTIPOLYGON (((-78.53874 3...
  4     1131  2909     4    1163 MULTIPOLYGON (((-77.10377 3...
  5     1396  3447     4    1524 MULTIPOLYGON (((-78.11377 3...
  6     1061  2777     7    1227 MULTIPOLYGON (((-77.68983 3...
  7     5904  9087    26    6899 MULTIPOLYGON (((-78.86451 3...
  8      818  2052     5    1023 MULTIPOLYGON (((-78.2615 34...
  9      580  1602     3     763 MULTIPOLYGON (((-78.02592 3...
  10    1431  4144    17    1832 MULTIPOLYGON (((-78.65572 3...
  > 
  > # nest:
  > storms.sf = st_as_sf(storms, coords = c("long", "lat"), crs = 4326)
  > x <- storms.sf %>% group_by(name, year) %>% nest
  Error: Quosures can only be unquoted within a quasiquotation context.
  
    # Bad:
    list(!!myquosure)
  
    # Good:
    dplyr::mutate(data, !!myquosure)
  Backtrace:
       █
    1. └─storms.sf %>% group_by(name, year) %>% nest
    2.   ├─base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
    3.   └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
    4.     └─base::eval(quote(`_fseq`(`_lhs`)), env, env)
    5.       └─`_fseq`(`_lhs`)
    6.         └─magrittr::freduce(value, `_function_list`)
    7.           ├─base::withVisible(function_list[[k]](value))
    8.           └─function_list[[k]](value)
    9.             ├─tidyr::nest(.)
   10.             └─sf:::nest.sf(.)
   11.               ├─tidyr::nest(data, ..., .key = !!key)
   12.               ├─tidyr:::nest.grouped_df(data, ..., .key = !!key)
   13.               │ └─tidyr:::check_key(.key)
   14.               │   └─rlang::is_missing(.key)
   15.               └─rlang:::Ops.quosure(key)
  Execution halted
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > suppressPackageStartupMessages(library(sf))
  > 
  > test_check("sf")
  Cannot open layer foo
  Reading layer `nospatial' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/gpkg/nospatial.gpkg' using driver `GPKG'
  Reading layer `nospatial' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/gpkg/nospatial.gpkg' using driver `GPKG'
  OGR: Unsupported geometry type
  Reading layer `nc' from data source `/data/gannet/ripley/R/packages/tests-devel/sf.Rcheck/sf/shape/nc.shp' using driver `ESRI Shapefile'
  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
  ── 1. Error: sample_n etc work (@test_tidy.R#42)  ──────────────────────────────
  Quosures can only be unquoted within a quasiquotation context.
  
    # Bad:
    list(!!myquosure)
  
    # Good:
    dplyr::mutate(data, !!myquosure)
  1: d %>% group_by(a) %>% nest at testthat/test_tidy.R:42
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: nest(.)
  10: nest.sf(.)
  11: tidyr::nest(data, ..., .key = !!key)
  12: nest.grouped_df(data, ..., .key = !!key)
  13: check_key(.key)
  14: is_missing(.key)
  15: Ops.quosure(key)
  16: abort(paste_line("Quosures can only be unquoted within a quasiquotation context.", 
         "", "  # Bad:", "  list(!!myquosure)", "", "  # Good:", "  dplyr::mutate(data, !!myquosure)"))
  
  ── 2. Error: unnest works (@test_tidy.R#59)  ───────────────────────────────────
  Can't slice a scalar
  1: unnest(nc, y) at testthat/test_tidy.R:59
  2: unnest.sf(nc, y)
  3: st_sf(NextMethod(.preserve = preserve_incl_sf), sf_column_name = sf_column_name)
  4: NextMethod(.preserve = preserve_incl_sf)
  5: unnest.data.frame(nc, y, .preserve = structure("geometry", .Names = ""))
  6: unchop(data, !!cols, keep_empty = keep_empty, ptype = ptype)
  7: vec_slice(data, rep(vec_seq_along(data), n))
  
  driver `foo' not available.
  Dataset /tmp/RtmpRO7VnB/working_dir/Rtmpxs1Oct/file3d564bdffaa2.gpkg already exists: remove first, use update=TRUE to append,
  delete_layer=TRUE to delete layer, or delete_dsn=TRUE to remove the entire data source before writing.
  Creating layer . failed.
  Failed to create feature 1 in x
  Failed to create feature 1 in x
  Failed to create feature 1 in x
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 663 | SKIPPED: 56 | WARNINGS: 4 | FAILED: 2 ]
  1. Error: sample_n etc work (@test_tidy.R#42) 
  2. Error: unnest works (@test_tidy.R#59) 
  
  Error: testthat unit tests failed
  Execution halted