Running 'aggregate.R' [2s]
  Comparing 'aggregate.Rout' to 'aggregate.Rout.save' ... OK
  Running 'cast.R' [2s]
  Comparing 'cast.Rout' to 'cast.Rout.save' ... OK
  Running 'crs.R' [2s]
  Comparing 'crs.Rout' to 'crs.Rout.save' ... OK
  Running 'dist.R' [2s]
  Comparing 'dist.Rout' to 'dist.Rout.save' ... OK
  Running 'dplyr.R' [2s]
  Running 'empty.R' [1s]
  Comparing 'empty.Rout' to 'empty.Rout.save' ... OK
  Running 'gdal_geom.R' [3s]
  Comparing 'gdal_geom.Rout' to 'gdal_geom.Rout.save' ... OK
  Running 'geos.R' [16s]
  Running 'graticule.R' [3s]
  Running 'grid.R' [2s]
  Comparing 'grid.Rout' to 'grid.Rout.save' ... OK
  Running 'maps.R' [5s]
  Comparing 'maps.Rout' to 'maps.Rout.save' ... OK
  Running 'plot.R' [13s]
  Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
  Running 'read.R' [4s]
  Running 'roundtrip.R' [11s]
  Comparing 'roundtrip.Rout' to 'roundtrip.Rout.save' ...145c145
< Reading layer `nc.gpkg' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\gpkg\nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `D:\RCompile\CRANguest\R-devel\lib\sf\gpkg\nc.gpkg' using driver `GPKG'
  Running 'sample.R' [2s]
  Comparing 'sample.Rout' to 'sample.Rout.save' ... OK
  Running 'sfc.R' [2s]
  Running 'sfg.R' [1s]
  Comparing 'sfg.Rout' to 'sfg.Rout.save' ... OK
  Running 'spatstat.R' [4s]
  Running 'stars.R' [4s]
  Comparing 'stars.Rout' to 'stars.Rout.save' ...125c125
< Reading layer `nc.gpkg' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\gpkg\nc.gpkg' using driver `GPKG'
---
> Reading layer `nc.gpkg' from data source `D:\RCompile\CRANguest\R-devel\lib\sf\gpkg\nc.gpkg' using driver `GPKG'
  Running 'testthat.R' [15s]
  Running 'units.R' [2s]
  Comparing 'units.Rout' to 'units.Rout.save' ... OK
  Running 'wkb.R' [2s]
  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
  
  > read_sf(system.file("shape/nc.shp", package="sf"), quiet = TRUE) %>%
  + 	st_transform(3857) -> nc
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: %>% ... process_cpl_read_ogr -> <Anonymous> -> update_tibble_attrs
  Execution halted
Running the tests in 'tests/geos.R' failed.
Complete output:
  > suppressPackageStartupMessages(library(sf))
  > # nc = st_read(system.file("gpkg/nc.gpkg", package="sf"))
  > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
  > nc_checked = st_transform(nc, 32119, check = TRUE)
  > ncm = st_transform(nc, 32119)
  > 
  > x = st_transform(nc[1:10,], 32119)
  > st_distance(x)
  Units: [m]
             [,1]      [,2]      [,3]      [,4]      [,5]      [,6]     [,7]
   [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
             [,8]      [,9]     [,10]
   [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
  > 
  > st_is_valid(nc)
    [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [31] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [46] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [61] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [76] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
   [91] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
  > 
  > st_is_empty(st_sfc(st_point(), st_linestring()))
  [1] TRUE TRUE
  > 
  > ops = c("intersects", #"disjoint", 
  + "touches", "crosses", "within", "contains", "overlaps", "equals", "covers", "covered_by", "equals_exact")
  > for (op in ops) {
  + 	x = sf:::st_geos_binop(op, ncm[1:50,], ncm[51:100,], 0, NA_character_, FALSE)
  + 	x = sf:::st_geos_binop(op, ncm[1:50,], ncm[51:100,], 0, NA_character_, TRUE)
  + }
  > 
  > ops = c("intersects", #"disjoint", 
  + "touches", "crosses", "within", "contains", "overlaps", "covers", "covered_by")
  > df = data.frame(ops = ops)
  > df$equal = NA
  > for (op in ops)
  + 	df[df$ops == op, "equal"] = identical(
  + 		sf:::st_geos_binop(op, ncm[1:50,], ncm[51:100,], 0, NA_character_, TRUE, FALSE),
  + 		sf:::st_geos_binop(op, ncm[1:50,], ncm[51:100,], 0, NA_character_, TRUE,  TRUE)
  + 	)
  > df
           ops equal
  1 intersects  TRUE
  2    touches  TRUE
  3    crosses  TRUE
  4     within  TRUE
  5   contains  TRUE
  6   overlaps  TRUE
  7     covers  TRUE
  8 covered_by  TRUE
  > 
  > st_contains_properly(ncm[1:3,], ncm[1:3])
  Sparse geometry binary predicate list of length 3, where the predicate was `contains_properly'
   1: (empty)
   2: (empty)
   3: (empty)
  > 
  > st_combine(nc)
  Geometry set for 1 feature 
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:            4267
  MULTIPOLYGON (((-81.47276 36.23436, -81.54084 3...
  > 
  > st_dimension(st_sfc(st_point(0:1), st_linestring(rbind(c(0,0),c(1,1))), 
  + 	st_polygon(list(rbind(c(0,0), c(1,0), c(1,1), c(0,1), c(0,0))))))
  [1] 0 1 2
  > 
  > ncbb = st_as_sfc(st_bbox(nc))
  > g = st_make_grid(ncbb)
  although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar
  > x = st_intersection(nc, g)
  although coordinates are longitude/latitude, st_intersection assumes that they are planar
  Warning message:
  attribute variables are assumed to be spatially constant throughout all geometries 
  > x = st_intersection(g, nc)
  although coordinates are longitude/latitude, st_intersection assumes that they are planar
  > 
  > ls = st_sfc(st_linestring(rbind(c(0,0),c(0,1))),
  + st_linestring(rbind(c(0,0),c(10,0))))
  > 
  > suppressWarnings(RNGversion("3.5.3"))
  > set.seed(13531)
  > 
  > st_line_sample(ls, density = 1, type = "random")
  Geometry set for 2 features 
  geometry type:  MULTIPOINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 6.880179 ymax: 0.8878369
  CRS:            NA
  MULTIPOINT ((0 0.8878369))
  MULTIPOINT ((0.2986488 0), (2.48417 0), (2.5678...
  > 
  > g = st_make_grid(ncbb, n = c(20,10))
  although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar
  > 
  > a1 = st_interpolate_aw(nc["BIR74"], g, FALSE)
  although coordinates are longitude/latitude, st_intersection assumes that they are planar
  Warning message:
  In st_interpolate_aw.sf(nc["BIR74"], g, FALSE) :
    st_interpolate_aw assumes attributes are constant over areas of x
  > sum(a1$BIR74) / sum(nc$BIR74) # not close to one: property is assumed spatially intensive
  [1] 1.436169
  > a2 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE)
  although coordinates are longitude/latitude, st_intersection assumes that they are planar
  Warning message:
  In st_interpolate_aw.sf(nc["BIR74"], g, extensive = TRUE) :
    st_interpolate_aw assumes attributes are constant over areas of x
  > sum(a2$BIR74) / sum(nc$BIR74)
  [1] 1.000013
  > 
  > # missing x:
  > g = st_make_grid(offset = c(0,0), cellsize = c(1,1), n = c(10,10))
  > g = st_make_grid(what = "centers")
  > length(g)
  [1] 648
  > g = st_make_grid(what = "corners")
  > length(g)
  [1] 703
  > 
  > g1 = st_make_grid(ncbb, 0.1, what = "polygons", square = FALSE)
  although coordinates are longitude/latitude, st_relate_pattern assumes that they are planar
  > g2 = st_make_grid(ncbb, 0.1, what = "points", square = FALSE)
  although coordinates are longitude/latitude, st_intersects assumes that they are planar
  although coordinates are longitude/latitude, st_intersects assumes that they are planar
  > 
  > # st_line_merge:
  > mls = st_multilinestring(list(rbind(c(0,0), c(1,1)), rbind(c(2,0), c(1,1))))
  > st_line_merge(mls)
  LINESTRING (0 0, 1 1, 2 0)
  > 
  > if (sf_extSoftVersion()["GEOS"] >= "3.5.0") {
  +  # voronoi:
  +  set.seed(1)
  +  x = st_multipoint(matrix(runif(10),,2))
  +  box = st_polygon(list(rbind(c(0,0),c(1,0),c(1,1),c(0,1),c(0,0))))
  +  v = st_sfc(st_voronoi(x, st_sfc(box)))
  +  plot(v, col = 0, border = 1, axes = TRUE)
  +  plot(box, add = TRUE, col = 0, border = 1) # a larger box is returned, as documented
  +  plot(x, add = TRUE, col = 'red', cex=2, pch=16)
  +  plot(st_intersection(st_cast(v), box)) # clip to smaller box
  +  plot(x, add = TRUE, col = 'red', cex=2, pch=16)
  + 
  +  v = st_voronoi(x)
  +  print(class(v))
  +  v = st_sfc(st_voronoi(st_sfc(x)))
  +  print(class(v))
  +  v = st_voronoi(st_sf(a = 1, geom = st_sfc(x)))
  +  print(class(v))
  + }
  [1] "XY"                 "GEOMETRYCOLLECTION" "sfg"               
  [1] "sfc_GEOMETRYCOLLECTION" "sfc"                   
  [1] "sf"         "data.frame"
  > 
  > i = st_intersects(ncm, ncm[1:88,])
  > all.equal(i, t(t(i)))
  [1] TRUE
  > 
  > # check use of pattern in st_relate:
  > sfc = st_as_sfc(st_bbox(st_sfc(st_point(c(0,0)), st_point(c(3,3)))))
  > grd = st_make_grid(sfc, n = c(3,3))
  > st_intersects(grd)
  Sparse geometry binary predicate list of length 9, where the predicate was `intersects'
   1: 1, 2, 4, 5
   2: 1, 2, 3, 4, 5, 6
   3: 2, 3, 5, 6
   4: 1, 2, 4, 5, 7, 8
   5: 1, 2, 3, 4, 5, 6, 7, 8, 9
   6: 2, 3, 5, 6, 8, 9
   7: 4, 5, 7, 8
   8: 4, 5, 6, 7, 8, 9
   9: 5, 6, 8, 9
  > st_relate(grd, pattern = "****1****")
  Sparse geometry binary predicate list of length 9, where the predicate was `relate_pattern'
   1: 1, 2, 4
   2: 1, 2, 3, 5
   3: 2, 3, 6
   4: 1, 4, 5, 7
   5: 2, 4, 5, 6, 8
   6: 3, 5, 6, 9
   7: 4, 7, 8
   8: 5, 7, 8, 9
   9: 6, 8, 9
  > st_relate(grd, pattern = "****0****")
  Sparse geometry binary predicate list of length 9, where the predicate was `relate_pattern'
   1: 5
   2: 4, 6
   3: 5
   4: 2, 8
   5: 1, 3, 7, 9
   6: 2, 8
   7: 5
   8: 4, 6
   9: 5
  > st_rook = function(a, b = a, ...) st_relate(a, b, pattern = "F***1****", ...)
  > st_rook(grd, sparse = FALSE)
         [,1]  [,2]  [,3]  [,4]  [,5]  [,6]  [,7]  [,8]  [,9]
   [1,] FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE
   [2,]  TRUE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE FALSE
   [3,] FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE
   [4,]  TRUE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE
   [5,] FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE
   [6,] FALSE FALSE  TRUE FALSE  TRUE FALSE FALSE FALSE  TRUE
   [7,] FALSE FALSE FALSE  TRUE FALSE FALSE FALSE  TRUE FALSE
   [8,] FALSE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE  TRUE
   [9,] FALSE FALSE FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE
  > 
  > #if (Sys.getenv("USER") %in% c("edzer", "travis")) { # memory leaks:
  >   try(st_relate(st_point(), st_point(), pattern = "FF*FF****")) # error: use st_disjoint
  Error in CPL_geos_binop(st_geometry(x), st_geometry(y), op, par, pattern,  : 
    use st_disjoint for this pattern
  > #}
  > 
  > a = st_is_within_distance(nc[c(1:3,20),], nc[1:3,], 100000, sparse = FALSE)
  > b = st_is_within_distance(nc[c(1:3,20),], nc[1:3,], units::set_units(100000, m), sparse = FALSE)
  > all.equal(a, b)
  [1] TRUE
  > x = st_is_within_distance(nc[1:3,], nc[1:5,], 100000)
  > y = st_is_within_distance(nc[1:3,], nc[1:5,], units::set_units(100, km))
  > all.equal(x, y)
  [1] TRUE
  > 
  > nc_3857 = st_transform(nc, 3857)
  > a = st_is_within_distance(nc_3857[c(1:3,20),], nc_3857[1:3,], 100000, sparse = FALSE)
  > b = st_is_within_distance(nc_3857[c(1:3,20),], nc_3857[1:3,], units::set_units(100000, m), sparse = FALSE)
  > all.equal(a, b)
  [1] TRUE
  > x = st_is_within_distance(nc_3857, nc_3857, 100000)
  > y = st_is_within_distance(nc_3857, nc_3857, units::set_units(100, km))
  > all.equal(x, y)
  [1] TRUE
  > 
  > pe = st_sfc(st_point())
  > p = st_sfc(st_point(c(0,0)), st_point(c(0,1)), st_point(c(0,2)))
  > st_distance(p, p)
       [,1] [,2] [,3]
  [1,]    0    1    2
  [2,]    1    0    1
  [3,]    2    1    0
  > st_distance(p, pe)
       [,1]
  [1,]   NA
  [2,]   NA
  [3,]   NA
  > st_distance(p, p, by_element = TRUE)
  [1] 0 0 0
  > st_crs(p) = 4326
  > st_distance(p, p[c(2,3,1)], by_element = TRUE)
  Units: [m]
  [1] 110574.4 110575.1 221149.5
  > p = st_transform(p, 3587)
  > st_distance(p, p[c(2,3,1)], by_element = TRUE)
  Units: [m]
  [1] 144589.5 142873.3 287462.8
  > 
  > # from https://github.com/r-spatial/sf/issues/458 :
  > pts <- st_sfc(st_point(c(.5,.5)), st_point(c(1.5, 1.5)), st_point(c(2.5, 2.5)))
  > pol <- st_polygon(list(rbind(c(0,0), c(2,0), c(2,2), c(0,2), c(0,0))))
  > pol_df <- data.frame(id = 1) 
  > st_geometry(pol_df) <- st_sfc(pol)
  > st_intersects(pts, pol_df[pol_df$id == 2,]) # with empty sf/sfc
  Sparse geometry binary predicate list of length 3, where the predicate was `intersects'
   1: (empty)
   2: (empty)
   3: (empty)
  > st_intersects(pts, pol_df[pol_df$id == 2,], sparse = FALSE) # with empty sf/sfc
      
  [1,]
  [2,]
  [3,]
  > 
  > # st_node
  > l = st_linestring(rbind(c(0,0), c(1,1), c(0,1), c(1,0), c(0,0)))
  > st_node(l)
  MULTILINESTRING ((0 0, 0.5 0.5), (0.5 0.5, 1 1, 0 1, 0.5 0.5), (0.5 0.5, 1 0, 0 0))
  > st_node(st_sfc(l))
  Geometry set for 1 feature 
  geometry type:  MULTILINESTRING
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  MULTILINESTRING ((0 0, 0.5 0.5), (0.5 0.5, 1 1,...
  > st_node(st_sf(a = 1, st_sfc(l)))
  Simple feature collection with 1 feature and 1 field
  geometry type:  MULTILINESTRING
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    a                      st_sfc.l.
  1 1 MULTILINESTRING ((0 0, 0.5 ...
  > 
  > # print.sgbp:
  > (lst = st_disjoint(nc, nc))
  although coordinates are longitude/latitude, st_intersects assumes that they are planar
  Sparse geometry binary predicate list of length 100, where the predicate was `disjoint'
  first 10 elements:
   1: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
   2: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ...
   3: 1, 4, 5, 6, 7, 8, 9, 11, 12, 13, ...
   4: 1, 2, 3, 5, 6, 8, 9, 10, 11, 12, ...
   5: 1, 2, 3, 4, 7, 8, 10, 11, 12, 13, ...
   6: 1, 2, 3, 4, 7, 9, 10, 11, 12, 13, ...
   7: 1, 2, 3, 5, 6, 9, 10, 11, 12, 13, ...
   8: 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, ...
   9: 1, 2, 3, 4, 6, 7, 8, 10, 11, 12, ...
   10: 1, 2, 4, 5, 6, 7, 8, 9, 11, 13, ...
  > # dim.sgbp:
  > dim(lst)
  [1] 100 100
  > # as.matrix.sgbp:
  > as.matrix(lst)[1:5, 1:5]
        [,1]  [,2]  [,3]  [,4]  [,5]
  [1,] FALSE FALSE  TRUE  TRUE  TRUE
  [2,] FALSE FALSE FALSE  TRUE  TRUE
  [3,]  TRUE FALSE FALSE  TRUE  TRUE
  [4,]  TRUE  TRUE  TRUE FALSE  TRUE
  [5,]  TRUE  TRUE  TRUE  TRUE FALSE
  > # negate:
  > !lst
  Sparse geometry binary predicate list of length 100, where the predicate was `!disjoint'
  first 10 elements:
   1: 1, 2, 18, 19
   2: 1, 2, 3, 18
   3: 2, 3, 10, 18, 23, 25
   4: 4, 7, 56
   5: 5, 6, 9, 16, 28
   6: 5, 6, 8, 28
   7: 4, 7, 8, 17
   8: 6, 7, 8, 17, 20, 21
   9: 5, 9, 15, 16, 24, 31
   10: 3, 10, 12, 25, 26
  > # as.data.frame:
  > head(as.data.frame(lst), 10)
     row.id col.id
  1       1      3
  2       1      4
  3       1      5
  4       1      6
  5       1      7
  6       1      8
  7       1      9
  8       1     10
  9       1     11
  10      1     12
  > 
  > # snap:
  > nc1 = st_transform(nc, 32119)
  > g = st_make_grid(nc1, c(5000,5000), what = "centers")
  > s = st_snap(nc1[1:3,], g, 2501*sqrt(2))
  > sfg = st_snap(st_geometry(nc1)[[1]], g, 2501*sqrt(2))
  > sfg = st_snap(st_geometry(nc1)[[1]], st_combine(g), 2501*sqrt(2))
  > 
  > # Hausdorff distance: http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1algorithm_1_1distance_1_1DiscreteHausdorffDistance.html
  > A = st_as_sfc("LINESTRING (0 0, 100 0, 10 100, 10 100)")
  > B = st_as_sfc("LINESTRING (0 100, 0 10, 80 10)")
  > st_distance(c(A,B))
           [,1]     [,2]
  [1,] 0.000000 8.176236
  [2,] 8.176236 0.000000
  > st_distance(c(A,B), which = "Hausdorff")
           [,1]     [,2]
  [1,]  0.00000 22.36068
  [2,] 22.36068  0.00000
  > st_distance(c(A,B), which = "Hausdorff", par = 0.001)
               [,1]         [,2]
  [1,] 2.929643e-14 4.789000e+01
  [2,] 4.789000e+01 2.131628e-14
  > LE = st_as_sfc("LINESTRING EMPTY")
  > st_distance(c(A, LE), which = "Hausdorff", par = 0.001)
               [,1] [,2]
  [1,] 2.929643e-14   NA
  [2,]           NA   NA
  > 
  > # one-argument st_intersection and st_difference:
  > set.seed(131)
  > m = rbind(c(0,0), c(1,0), c(1,1), c(0,1), c(0,0))
  > p = st_polygon(list(m))
  > n = 100
  > l = vector("list", n)
  > for (i in 1:n)
  +    l[[i]] = p + 10 * runif(2)
  > s = st_sfc(l)
  > plot(s, col = sf.colors(categorical = TRUE, alpha = .5))
  > d = st_difference(s) # sequential differences: s1, s2-s1, s3-s2-s1, ...
  > plot(d, col = sf.colors(categorical = TRUE, alpha = .5))
  > i = st_intersection(s) # all intersections
  > plot(i, col = sf.colors(categorical = TRUE, alpha = .5))
  > summary(lengths(st_overlaps(s, s)))
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
     0.00    2.00    3.50    3.66    5.00    8.00 
  > summary(lengths(st_overlaps(d, d)))
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
        0       0       0       0       0       0 
  > summary(lengths(st_overlaps(i, i)))
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
        0       0       0       0       0       0 
  > 
  > sf = st_sf(s)
  > i = st_intersection(sf) # all intersections
  > plot(i["n.overlaps"])
  > summary(i$n.overlaps - lengths(i$origins))
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
        0       0       0       0       0       0 
  > 
  > # st_nearest_points:
  > pt1 = st_point(c(.1,.1))
  > pt2 = st_point(c(.9,.9))
  > b1 = st_buffer(pt1, 0.1)
  > b2 = st_buffer(pt2, 0.1)
  > plot(b1, xlim = c(0,1), ylim = c(0,1))
  > plot(b2, add = TRUE)
  > (ls0 = try(st_nearest_points(b1, b2))) # sfg
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 0.1707107 ymin: 0.1707107 xmax: 0.8292893 ymax: 0.8292893
  CRS:            NA
  LINESTRING (0.1707107 0.1707107, 0.8292893 0.82...
  > (ls = try(st_nearest_points(st_sfc(b1), st_sfc(b2)))) # sfc
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 0.1707107 ymin: 0.1707107 xmax: 0.8292893 ymax: 0.8292893
  CRS:            NA
  LINESTRING (0.1707107 0.1707107, 0.8292893 0.82...
  > (ls = try(st_nearest_points(st_sfc(b1), st_sfc(b2), pairwise = TRUE))) # sfc
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 0.1707107 ymin: 0.1707107 xmax: 0.8292893 ymax: 0.8292893
  CRS:            NA
  LINESTRING (0.1707107 0.1707107, 0.8292893 0.82...
  > identical(ls0, ls)
  [1] TRUE
  > # plot(ls, add = TRUE, col = 'red')
  > 
  > nc = read_sf(system.file("gpkg/nc.gpkg", package="sf"))
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: read_sf ... process_cpl_read_ogr -> <Anonymous> -> update_tibble_attrs
  Execution halted
Running the tests in 'tests/graticule.R' failed.
Complete output:
  > library(maps)
  > m = map('usa', plot = FALSE, fill = TRUE)
  > suppressPackageStartupMessages(library(sf))
  > m0 <- st_as_sfc(m)
  > m <- st_as_sf(m)
  > 
  > laea = st_crs("+proj=laea +lat_0=30 +lon_0=-95") # Lambert equal area
  > m <- st_transform(st_as_sf(m), laea)
  > 
  > bb = st_bbox(m)
  > bbox = st_linestring(rbind(c( bb[1],bb[2]),c( bb[3],bb[2]),c( bb[3],bb[4]),c( bb[1],bb[4]),c( bb[1],bb[2])))
  > 
  > g = st_graticule(m)
  > plot(m, xlim = 1.2 * c(-2450853.4, 2186391.9))
  > plot(g[1], add = TRUE, col = 'grey')
  > plot(bbox, add = TRUE)
  > points(g$x_start, g$y_start, col = 'red')
  > points(g$x_end, g$y_end, col = 'blue')
  > 
  > invisible(lapply(seq_len(nrow(g)), function(i) {
  + 	if (g$type[i] == "N" && g$x_start[i] - min(g$x_start) < 1000)
  + 		text(g[i,"x_start"], g[i,"y_start"], labels = parse(text = g[i,"degree_label"]), 
  + 			srt = g$angle_start[i], pos = 2, cex = .7)
  + 	if (g$type[i] == "E" && g$y_start[i] - min(g$y_start) < 1000)
  + 		text(g[i,"x_start"], g[i,"y_start"], labels = parse(text = g[i,"degree_label"]), 
  + 			srt = g$angle_start[i] - 90, pos = 1, cex = .7)
  + 	if (g$type[i] == "N" && g$x_end[i] - max(g$x_end) > -1000)
  + 		text(g[i,"x_end"], g[i,"y_end"], labels = parse(text = g[i,"degree_label"]), 
  + 			srt = g$angle_end[i], pos = 4, cex = .7)
  + 	if (g$type[i] == "E" && g$y_end[i] - max(g$y_end) > -1000)
  + 		text(g[i,"x_end"], g[i,"y_end"], labels = parse(text = g[i,"degree_label"]), 
  + 			srt = g$angle_end[i] - 90, pos = 3, cex = .7)
  + }))
  > 
  > plot(m, graticule = st_crs(4326))
  > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
  > # options(warn=2)
  > g = st_graticule(nc, datum = st_crs(nc))
  > #g = st_graticule(nc)
  > 
  > plot(nc[1], graticule = st_crs(nc))
  > 
  > plot(nc[1], graticule = st_crs(nc), axes = TRUE)
  > 
  > g = st_graticule()
  > 
  > library(ggplot2)
  > if (utils::packageVersion("ggplot2") > "2.2.1") {
  +   ggplot() + geom_sf(data = st_set_crs(nc, NA_crs_)) # NA_crs_ for crs
  + }
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: <Anonymous> ... recycle_columns -> new_tibble -> update_tibble_attrs
  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
  CRS:            4326
    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.550719 5...
  2 MULTIPOLYGON (((-1.555763 5...
  3 MULTIPOLYGON (((-1.551502 5...
  > 
  > # 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
  CRS:            4267
  First 10 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
     NWBIR74 BIR79 SID79 NWBIR79                       geometry
  1       10  1364     0      19 MULTIPOLYGON (((-81.47276 3...
  2       10   542     3      12 MULTIPOLYGON (((-81.23989 3...
  3      208  3616     6     260 MULTIPOLYGON (((-80.45634 3...
  4      123   830     2     145 MULTIPOLYGON (((-76.00897 3...
  5     1066  1606     3    1197 MULTIPOLYGON (((-77.21767 3...
  6      954  1838     5    1237 MULTIPOLYGON (((-76.74506 3...
  7      115   350     2     139 MULTIPOLYGON (((-76.00897 3...
  8      254   594     2     371 MULTIPOLYGON (((-76.56251 3...
  9      748  1190     2     844 MULTIPOLYGON (((-78.30876 3...
  10     160  2038     5     176 MULTIPOLYGON (((-80.02567 3...
  > 
  > 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
  Error : Cannot open "foo"; The file doesn't seem to exist.
  > try(st_read("x.gpkg", "xyz")) # cannot open layer
  Error : Cannot open "x.gpkg"; The file doesn't seem to exist.
  > try(st_write(c("foo", "bar")))
  Error in UseMethod("st_write") : 
    no applicable method for 'st_write' applied to an object of class "character"
  > try(st_write(x, c("foo", "bar")))
  Error in guess_driver(dns) : length(dsn) == 1 is not TRUE
  > 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"))
  + 	st_write(x, "xxx.gpkg")
  + 	st_write(x, "xxx.gpkg", append = TRUE, quiet = FALSE) # appends to layer
  + 	y <- st_sf(b = 1:2, geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2))))
  + 	try(st_write(y, "xxx.gpkg"))
  + }
  > 
  > geom = st_sfc(st_point(0:1), st_multipoint(matrix(1:4,2,2)))
  > st_write(geom, "geom.gpkg")
  Writing layer `geom' to data source `geom.gpkg' using driver `GPKG'
  Writing 2 features with 0 fields and geometry type Unknown (any).
  > st_write(geom, "geom1.gpkg", layer = "foo")
  Writing layer `foo' to data source `geom1.gpkg' using driver `GPKG'
  Writing 2 features with 0 fields and geometry type Unknown (any).
  > 
  > 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
  CRS:            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)
  + 	# or:
  + 	(s = st_read(dbcon, "meuse.sqlite"))[1:3,]
  + 	dbDisconnect(dbcon)
  + 
  + 	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)
  + 	dbDisconnect(dbcon)
  + 
  + 	db = system.file("sqlite/b.sqlite", package = "sf") # has an INT8 field
  + 	b = st_read(db, quiet = TRUE)
  + 	print(b)
  + 	b = st_read(db, int64_as_string = TRUE, quiet = 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
  Simple feature collection with 155 features and 13 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 178605 ymin: 329714 xmax: 181390 ymax: 333611
  CRS:            NA
  First 3 features:
    ogc_fid cadmium copper lead zinc  elev       dist   om ffreq soil lime
  1       1    11.7     85  299 1022 7.909 0.00135803 13.6     1    1    1
  2       2     8.6     81  277 1141 6.983 0.01222430 14.0     1    1    1
  3       3     6.5     68  199  640 7.800 0.10302900 13.0     1    1    1
    landuse dist.m              GEOMETRY
  1      Ah     50 POINT (181072 333611)
  2      Ah     30 POINT (181025 333558)
  3      Ah    150 POINT (181165 333537)
  Simple feature collection with 100 features and 15 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:            NA
  First 3 features:
    ogc_fid  area perimeter cnty_ cnty_id      name  fips fipsno cress_id bir74
  1       1 0.114     1.442  1825    1825      Ashe 37009  37009        5  1091
  2       2 0.061     1.231  1827    1827 Alleghany 37005  37005        3   487
  3       3 0.143     1.630  1828    1828     Surry 37171  37171       86  3188
    sid74 nwbir74 bir79 sid79 nwbir79                       GEOMETRY
  1     1      10  1364     0      19 MULTIPOLYGON (((-81.47276 3...
  2     0      10   542     3      12 MULTIPOLYGON (((-81.23989 3...
  3     5     208  3616     6     260 MULTIPOLYGON (((-80.45634 3...
  Integer64 values larger than 9.0072e+015 lost significance after conversion to double;
  use argument int64_as_string = TRUE to import them lossless, as character
  Simple feature collection with 1 feature and 2 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
    a       bigint    GEOMETRY
  1 1 4.611686e+18 POINT (0 1)
  Simple feature collection with 1 feature and 2 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
    a              bigint    GEOMETRY
  1 1 4611686018427387904 POINT (0 1)
  Simple feature collection with 10 features and 2 fields
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 645003 ymin: 4822568 xmax: 748805.6 ymax: 4992001
  CRS:            EPSG:32632
  First 3 features:
    PK_UID    Name                       Geometry
  1      1 Unknown LINESTRING (668540.7 485826...
  2      2 Unknown LINESTRING (671365.9 485417...
  3      3 Unknown LINESTRING (671417.6 485417...
  Simple feature collection with 8101 features and 6 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 319224 ymin: 3934674 xmax: 1308585 ymax: 5214373
  CRS:            EPSG:32632
  First 3 features:
    PK_UID               Name Peoples LocalCounc County Region
  1      1            Brozolo     435          1      0      0
  2      2 Campiglione-Fenile    1284          1      0      0
  3      3          Canischio     274          1      0      0
                    Geometry
  1 POINT (427002.8 4996361)
  2 POINT (367470.5 4962415)
  3 POINT (390084.1 5025552)
  Simple feature collection with 10 features and 2 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: 378359.8 ymin: 4198234 xmax: 1211486 ymax: 5036803
  CRS:            EPSG:32632
  First 3 features:
    PK_UID   Name                       Geometry
  1      1 VENETO MULTIPOLYGON (((752912.3 50...
  2      2 VENETO MULTIPOLYGON (((751705.5 50...
  3      3 VENETO MULTIPOLYGON (((766247.8 50...
  > 
  > csv = system.file("csv/pt.csv", package = "sf")
  > identical(st_read(quiet = TRUE, csv, options = "AUTODETECT_TYPE=Yes")$Int64[3], NA_real_)
  [1] TRUE
  > identical(st_read(quiet = TRUE, csv, int64_as_string = TRUE, stringsAsFactors = FALSE,
  + 	options = "AUTODETECT_TYPE=Yes")$Int64[3], NA_character_)
  [1] TRUE
  > identical(st_read(quiet = TRUE, csv, options = "AUTODETECT_TYPE=Yes")$Int32[3], NA_integer_)
  [1] TRUE
  > 
  > if ("GML" %in% st_drivers()$name) {
  +   gml = system.file("gml/fmi_test.gml", package = "sf")
  +   print(dim(st_read(gml, quiet = TRUE)))
  +   gml = system.file("gml/20170930_OB_530964_UKSH.xml.gz", package = "sf")
  +   print(dim(st_read(gml, layer = "Parcely", quiet = TRUE)))
  +   print(dim(st_read(gml, layer = "Parcely", int64_as_string=TRUE, quiet = TRUE)))
  + }
  [1] 22 11
  [1] 644  25
  [1] 644  25
  > 
  > # logical:
  > if ("GPKG" %in% st_drivers()$name) {
  + 	tst = st_read(system.file("gpkg/nc.gpkg", package="sf"), quiet = TRUE) # default layer name
  + 	tst$bool = tst$NWBIR79 > 800 # logical
  + 	tst$bool[1:3] = NA
  + 	st_write(tst, "tst__.gpkg")
  + 	tst2 = st_read("tst__.gpkg")
  + 	print(identical(tst$bool, tst2$bool))
  + }
  Writing layer `tst__' to data source `tst__.gpkg' using driver `GPKG'
  Writing 100 features with 15 fields and geometry type Multi Polygon.
  Reading layer `tst__' from data source `d:\RCompile\CRANpkg\local\3.5\sf.Rcheck\tests_x64\tst__.gpkg' using driver `GPKG'
  Simple feature collection with 100 features and 15 fields
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: -84.32385 ymin: 33.88199 xmax: -75.45698 ymax: 36.58965
  CRS:            4267
  [1] TRUE
  > 
  > # spatial filter:
  > nc = read_sf(system.file("gpkg/nc.gpkg", package="sf"))
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: read_sf ... process_cpl_read_ogr -> <Anonymous> -> update_tibble_attrs
  Execution halted
Running the tests in 'tests/sfc.R' failed.
Complete output:
  > suppressPackageStartupMessages(library(sf))
  > library(testthat)
  > 
  > p = st_point(c(1/3,1/6))
  > st_sfc(p, precision = 1000)
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.3333333 ymin: 0.1666667 xmax: 0.3333333 ymax: 0.1666667
  CRS:            NA
  precision:      1000 
  POINT (0.3333333 0.1666667)
  > st_as_sfc(st_as_binary(st_sfc(p, precision = 0L)))
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.3333333 ymin: 0.1666667 xmax: 0.3333333 ymax: 0.1666667
  CRS:            NA
  POINT (0.3333333 0.1666667)
  > st_as_sfc(st_as_binary(st_sfc(p, precision = 1000)))
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.333 ymin: 0.167 xmax: 0.333 ymax: 0.167
  CRS:            NA
  POINT (0.333 0.167)
  > st_as_sfc(st_as_binary(st_sfc(p, precision = 1000000)))
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.333333 ymin: 0.166667 xmax: 0.333333 ymax: 0.166667
  CRS:            NA
  POINT (0.333333 0.166667)
  > st_as_sfc(st_as_binary(st_sfc(p, precision = 10L)))
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.3 ymin: 0.2 xmax: 0.3 ymax: 0.2
  CRS:            NA
  POINT (0.3 0.2)
  > st_as_sfc(st_as_binary(st_sfc(p, precision = -1)))
  Geometry set for 1 feature 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0.3333333 ymin: 0.1666667 xmax: 0.3333333 ymax: 0.1666667
  CRS:            NA
  POINT (0.3333333 0.1666667)
  > 
  > d = data.frame(a = 1:2)
  > d$geom = c("POINT(0 0)", "POINT(1 1)")
  > 
  > st_as_sf(d, wkt = "geom")
  Simple feature collection with 2 features and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    a        geom
  1 1 POINT (0 0)
  2 2 POINT (1 1)
  > st_as_sf(d, wkt = 2)
  Simple feature collection with 2 features and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    a        geom
  1 1 POINT (0 0)
  2 2 POINT (1 1)
  > st_as_sf(d, wkt = "geom", remove = FALSE)
  Simple feature collection with 2 features and 2 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    a       geom    geometry
  1 1 POINT(0 0) POINT (0 0)
  2 2 POINT(1 1) POINT (1 1)
  > 
  > st_as_sfc(c("POINT(0 0)", "POINT(1 1)"))
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  POINT (0 0)
  POINT (1 1)
  > st_as_sfc(c("POINT(0 0)", "POINT(1 1)", "POLYGON((0 0,1 1,0 1,0 0))"))
  Geometry set for 3 features 
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  POINT (0 0)
  POINT (1 1)
  POLYGON ((0 0, 1 1, 0 1, 0 0))
  > st_as_sfc(character(0))
  Geometry set for 0 features 
  bbox:           xmin: NA ymin: NA xmax: NA ymax: NA
  CRS:            NA
  > x = st_as_sfc(character(0), 4326)
  > y = st_as_sfc(character(0), crs = 4326)
  > all.equal(x, y)
  [1] TRUE
  > st_as_sfc(c("POINT(0 0)", "POINT(1 1)", "POLYGON((0 0,1 1,0 1,0 0))"),
  + 	"+proj=longlat +datum=WGS84")
  Geometry set for 3 features 
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            +proj=longlat +datum=WGS84
  POINT (0 0)
  POINT (1 1)
  POLYGON ((0 0, 1 1, 0 1, 0 0))
  > dg = st_as_sf(d, wkt = "geom")
  > print(dg, n = 1)
  Simple feature collection with 2 features and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  First 1 features:
    a        geom
  1 1 POINT (0 0)
  > head(st_as_sf(d, wkt = "geom"), 1)
  Simple feature collection with 1 feature and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 0 ymax: 0
  CRS:            NA
    a        geom
  1 1 POINT (0 0)
  > 
  > d$geom = st_as_sfc(d$geom)
  > d1 = d
  > attr(d1, "sf_col") = "geom"
  > st_geometry(d1) = d$geom
  > 
  > d$geometry = d$geom # second geometry list-column
  > expect_warning(st_geometry(d) <- d$geom)
  > d
  Simple feature collection with 2 features and 1 field
  Active geometry column: geom
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    a        geom    geometry
  1 1 POINT (0 0) POINT (0 0)
  2 2 POINT (1 1) POINT (1 1)
  > 
  > x = st_sfc(list(st_point(0:1), st_point(0:1)), crs = 4326)
  > # don't warn when replacing crs with identical value:
  > st_sfc(x, crs = 4326)
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            EPSG:4326
  POINT (0 1)
  POINT (0 1)
  > y = st_sfc(x, crs = "+proj=longlat +datum=WGS84 +no_defs")
  > # but do when it changes:
  > y = st_sfc(x, crs = 3857)
  Warning message:
  st_crs<- : replacing crs does not reproject data; use st_transform for that 
  > 
  > p = st_point(0:1)
  > st_cast(p, "MULTIPOINT")
  MULTIPOINT ((0 1))
  > mp = st_multipoint(rbind(c(0,1), c(2,2)))
  > st_cast(mp, "POINT")
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(mp, "POINT") : point from first coordinate only
  > st_cast(mp, "MULTIPOINT")
  MULTIPOINT ((0 1), (2 2))
  > 
  > # geometry collection to its elements:
  > st_cast(st_geometrycollection(list(mp)), "POINT")
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(x[[1]], to, ...) : point from first coordinate only
  > st_cast(st_geometrycollection(list(mp)), "MULTIPOINT")
  MULTIPOINT ((0 1), (2 2))
  > st_cast(st_geometrycollection(list(p,mp)), "MULTIPOINT")
  MULTIPOINT ((0 1))
  Warning message:
  In st_cast.GEOMETRYCOLLECTION(st_geometrycollection(list(p, mp)),  :
    only first part of geometrycollection is retained
  > 
  > mp = st_multipoint(rbind(c(0,1)))
  > x = st_sfc(p, mp)
  > st_cast(x, "POINT")
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(X[[i]], ...) : point from first coordinate only
  > 
  > sf = st_sf(a = 3:2, geom = x)
  > st_cast(sf, "POINT")
  Simple feature collection with 2 features and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
    a        geom
  1 3 POINT (0 1)
  2 2 POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(X[[i]], ...) : point from first coordinate only
  > 
  > suppressPackageStartupMessages( library(dplyr) )
  > 
  > x %>% st_cast("POINT")
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(X[[i]], ...) : point from first coordinate only
  > 
  > # points:
  > mp = st_multipoint(rbind(c(0,1))) # single-point multipoint
  > st_sfc(p,mp) %>% st_cast("POINT")
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(X[[i]], ...) : point from first coordinate only
  > st_sfc(p,mp) %>% st_cast("MULTIPOINT")
  Geometry set for 2 features 
  geometry type:  MULTIPOINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  MULTIPOINT ((0 1))
  MULTIPOINT ((0 1))
  > 
  > # lines:
  > pts = rbind(c(0,0), c(1,1), c(2,1))
  > st_sfc(st_linestring(pts), st_multilinestring(list(pts))) %>% st_cast("LINESTRING")
  Geometry set for 2 features 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 2 ymax: 1
  CRS:            NA
  LINESTRING (0 0, 1 1, 2 1)
  LINESTRING (0 0, 1 1, 2 1)
  > st_sfc(st_linestring(pts), st_multilinestring(list(pts))) %>% st_cast("MULTILINESTRING")
  Geometry set for 2 features 
  geometry type:  MULTILINESTRING
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 2 ymax: 1
  CRS:            NA
  MULTILINESTRING ((0 0, 1 1, 2 1))
  MULTILINESTRING ((0 0, 1 1, 2 1))
  > 
  > # polygons:
  > pts = rbind(c(0,0), c(1,1), c(0,1), c(0,0))
  > st_sfc(st_polygon(list(pts)), st_multipolygon(list(list(pts)))) %>% st_cast("POLYGON")
  Geometry set for 2 features 
  geometry type:  POLYGON
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  POLYGON ((0 0, 1 1, 0 1, 0 0))
  POLYGON ((0 0, 1 1, 0 1, 0 0))
  > st_sfc(st_polygon(list(pts)), st_multipolygon(list(list(pts)))) %>% st_cast("MULTIPOLYGON")
  Geometry set for 2 features 
  geometry type:  MULTIPOLYGON
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
  MULTIPOLYGON (((0 0, 1 1, 0 1, 0 0)))
  MULTIPOLYGON (((0 0, 1 1, 0 1, 0 0)))
  > 
  > 
  > st_sfc(st_geometrycollection(list(p)), st_geometrycollection(list(mp))) %>% st_cast()
  Geometry set for 2 features 
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  MULTIPOINT ((0 1))
  > st_sfc(st_geometrycollection(list(p)), st_geometrycollection(list(mp))) %>%
  + 	st_cast() %>%
  + 	st_cast("POINT")
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  POINT (0 1)
  Warning message:
  In st_cast.MULTIPOINT(X[[i]], ...) : point from first coordinate only
  > 
  > p = rbind(c(0,0),c(1,0),c(1,1),c(0,1),c(0,0))
  > pol = st_polygon(list(p))
  > # plot(pol)
  > try(plot(st_polygonize(pol))) # --> breaks
  Error in st_polygonize.sfc(st_sfc(x)) : 
    inherits(x, "sfc_LINESTRING") || inherits(x, "sfc_MULTILINESTRING") is not TRUE
  > st_length(st_sfc(st_point(c(0,0))))
  [1] 0
  > 
  > try(as(st_sfc(st_linestring(matrix(1:9,3))), "Spatial"))
  Error in StopZ(zm) : 
    sp supports Z dimension only for POINT and MULTIPOINT.
  use `st_zm(...)` to coerce to XY dimensions
  > 
  > # check conus is present:
  > x = st_sfc(st_point(c(-90,35)), st_point(c(-80,36)),
  + 	crs = "+proj=longlat +datum=NAD27")
  > y = st_transform(x, 3857)
  > 
  > sf_extSoftVersion()[1:3]
     GEOS    GDAL  proj.4 
  "3.6.1" "2.2.3" "4.9.3" 
  > 
  > # Ops.sfc:
  > ls = st_sfc(st_linestring(rbind(c(0,0),c(0,1))))
  > ls * 2
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 0 ymax: 2
  CRS:            NA
  LINESTRING (0 0, 0 2)
  > ls - 2
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: -2 ymin: -2 xmax: -2 ymax: -1
  CRS:            NA
  LINESTRING (-2 -2, -2 -1)
  > (ls + 2) %% 3
  Geometry set for 1 feature 
  geometry type:  LINESTRING
  dimension:      XY
  bbox:           xmin: 2 ymin: 0 xmax: 2 ymax: 2
  CRS:            NA
  LINESTRING (2 2, 2 0)
  > ls / ls
  Geometry set for 1 feature  (with 1 geometry empty)
  geometry type:  GEOMETRYCOLLECTION
  dimension:      XY
  bbox:           xmin: NA ymin: NA xmax: NA ymax: NA
  CRS:            NA
  GEOMETRYCOLLECTION EMPTY
  > p_ = st_point(0:1)
  > ll = st_sfc(ls[[1]], p_)
  > ll & st_sfc(p_)
  Geometry set for 2 features 
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 1 xmax: 0 ymax: 1
  CRS:            NA
  POINT (0 1)
  POINT (0 1)
  > ll | st_sfc(p_)
  Geometry set for 2 features 
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 0 ymax: 1
  CRS:            NA
  LINESTRING (0 0, 0 1)
  POINT (0 1)
  > ll %/% st_sfc(p_)
  Geometry set for 2 features  (with 1 geometry empty)
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 0 ymax: 1
  CRS:            NA
  LINESTRING (0 0, 0 1)
  GEOMETRYCOLLECTION EMPTY
  > ll == st_sfc(p_)
  [1] FALSE  TRUE
  > ll != st_sfc(p_)
  [1]  TRUE FALSE
  > 
  > 
  > str(x)
  sfc_POINT of length 2; first list element:  'XY' num [1:2] -90 35
  > nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE)
  > str(nc)
  Classes 'sf' and 'data.frame':	100 obs. of  15 variables:
   $ AREA     : num  0.114 0.061 0.143 0.07 0.153 0.097 0.062 0.091 0.118 0.124 ...
   $ PERIMETER: num  1.44 1.23 1.63 2.97 2.21 ...
   $ CNTY_    : num  1825 1827 1828 1831 1832 ...
   $ CNTY_ID  : num  1825 1827 1828 1831 1832 ...
   $ NAME     : Factor w/ 100 levels "Alamance","Alexander",..: 5 3 86 27 66 46 15 37 93 85 ...
   $ FIPS     : Factor w/ 100 levels "37001","37003",..: 5 3 86 27 66 46 15 37 93 85 ...
   $ FIPSNO   : num  37009 37005 37171 37053 37131 ...
   $ CRESS_ID : int  5 3 86 27 66 46 15 37 93 85 ...
   $ BIR74    : num  1091 487 3188 508 1421 ...
   $ SID74    : num  1 0 5 1 9 7 0 0 4 1 ...
   $ NWBIR74  : num  10 10 208 123 1066 ...
   $ BIR79    : num  1364 542 3616 830 1606 ...
   $ SID79    : num  0 3 6 2 3 5 2 2 2 5 ...
   $ NWBIR79  : num  19 12 260 145 1197 ...
   $ geometry :sfc_MULTIPOLYGON of length 100; first list element: List of 1
    ..$ :List of 1
    .. ..$ : num [1:27, 1:2] -81.5 -81.5 -81.6 -81.6 -81.7 ...
    ..- attr(*, "class")= chr  "XY" "MULTIPOLYGON" "sfg"
   - attr(*, "sf_column")= chr "geometry"
   - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA NA NA NA NA NA NA ...
    ..- attr(*, "names")= chr  "AREA" "PERIMETER" "CNTY_" "CNTY_ID" ...
  > bb = st_as_sfc(st_bbox(nc))
  > format(st_bbox(nc))
  [1] "((-84.32385,33.88199),(-75.45698,36.58965))"
  > 
  > st_agr("constant")
  [1] constant
  Levels: constant aggregate identity
  > st_agr()
  [1] <NA>
  Levels: constant aggregate identity
  > x <- st_sf(a = 1:2, b = 3:4, geom = x, agr = c("constant", "aggregate"))
  > suppressPackageStartupMessages(library(dplyr))
  > y <- x %>% st_set_agr("constant")
  > y
  Simple feature collection with 2 features and 2 fields
  Attribute-geometry relationship: 2 constant, 0 aggregate, 0 identity
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: -90 ymin: 35 xmax: -80 ymax: 36
  CRS:            +proj=longlat +datum=NAD27
    a b           geom
  1 1 3 POINT (-90 35)
  2 2 4 POINT (-80 36)
  > 
  > sf1 <- st_sf(a = c("x", "y"), geom = st_sfc(st_point(3:4), st_point(3:4)))
  > sf1[names(sf1)]
  Simple feature collection with 2 features and 1 field
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 3 ymin: 4 xmax: 3 ymax: 4
  CRS:            NA
    a        geom
  1 x POINT (3 4)
  2 y POINT (3 4)
  > 
  > st_bbox(sf1)
  xmin ymin xmax ymax 
     3    4    3    4 
  > bb = st_bbox(nc)
  > bb
       xmin      ymin      xmax      ymax 
  -84.32385  33.88199 -75.45698  36.58965 
  > st_crs(bb)
  Coordinate Reference System:
    User input: 4267 
    wkt:
  GEOGCS["GCS_North_American_1927",
      DATUM["North_American_Datum_1927",
          SPHEROID["Clarke_1866",6378206.4,294.9786982]],
      PRIMEM["Greenwich",0],
      UNIT["Degree",0.017453292519943295],
      AUTHORITY["EPSG","4267"]]
  > st_bbox(c(xmin = 16.1, xmax = 16.6, ymin = 48.6, ymax = 47.9), crs = st_crs(4326))
  xmin ymin xmax ymax 
  16.1 48.6 16.6 47.9 
  > st_bbox(c(xmin = 16.1, xmax = 16.6, ymin = 48.6, ymax = 47.9), crs = 4326)
  xmin ymin xmax ymax 
  16.1 48.6 16.6 47.9 
  > 
  > bb$xrange
       xmin      xmax 
  -84.32385 -75.45698 
  > bb$yrange
      ymin     ymax 
  33.88199 36.58965 
  > bb$xmin
       xmin 
  -84.32385 
  > bb$ymin
      ymin 
  33.88199 
  > bb$xmax
       xmax 
  -75.45698 
  > bb$ymax
      ymax 
  36.58965 
  > try(bb$foo)
  Error in `$.bbox`(bb, foo) : unsupported name
  > 
  > # merge:
  > a = data.frame(a = 1:3, b = 5:7)
  > st_geometry(a) = st_sfc(st_point(c(0,0)), st_point(c(1,1)), st_point(c(2,2)))
  > b = data.frame(x = c("a", "b", "c"), b = c(2,5,6))
  > merge(a, b)
  Simple feature collection with 2 features and 3 fields
  geometry type:  POINT
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 1 ymax: 1
  CRS:            NA
    b a x    geometry
  1 5 1 b POINT (0 0)
  2 6 2 c POINT (1 1)
  > merge(a, b, all = TRUE)
  Simple feature collection with 4 features and 3 fields (with 1 geometry empty)
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0 ymin: 0 xmax: 2 ymax: 2
  CRS:            NA
    b  a    x                 geometry
  1 2 NA    a GEOMETRYCOLLECTION EMPTY
  2 5  1    b              POINT (0 0)
  3 6  2    c              POINT (1 1)
  4 7  3 <NA>              POINT (2 2)
  > 
  > # joins:
  > inner_join(a, b)
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: inner_join ... recycle_columns -> new_tibble -> update_tibble_attrs
  Execution halted
Running the tests in 'tests/spatstat.R' failed.
Complete output:
  > suppressPackageStartupMessages(library(spatstat))
  > suppressPackageStartupMessages(library(sf))
  > 
  > data(chicago)
  > st_as_sf(chicago)
  Simple feature collection with 620 features and 4 fields
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 0.3893523 ymin: 153.1034 xmax: 1281.986 ymax: 1276.56
  CRS:            NA
  First 10 features:
       label seg tp marks                           geom
  1   window  NA NA  <NA> POLYGON ((0.3893523 153.103...
  2  segment  NA NA  <NA> LINESTRING (0.3894739 1253....
  3  segment  NA NA  <NA> LINESTRING (109.683 1251.77...
  4  segment  NA NA  <NA> LINESTRING (109.683 1251.77...
  5  segment  NA NA  <NA> LINESTRING (198.1486 1276.5...
  6  segment  NA NA  <NA> LINESTRING (197.9988 1251.1...
  7  segment  NA NA  <NA> LINESTRING (290.4787 1276.5...
  8  segment  NA NA  <NA> LINESTRING (288.9907 1250.5...
  9  segment  NA NA  <NA> LINESTRING (380.1326 1276.5...
  10 segment  NA NA  <NA> LINESTRING (379.9827 1249.8...
  > # ppp:
  > g = gorillas
  > st_as_sf(g)
  Simple feature collection with 648 features and 4 fields
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 580457.9 ymin: 674172.8 xmax: 585934 ymax: 678739.2
  CRS:            NA
  First 10 features:
      label group season       date                           geom
  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)
  > marks(g) = NULL
  > st_as_sf(g)
  Simple feature collection with 648 features and 1 field
  geometry type:  GEOMETRY
  dimension:      XY
  bbox:           xmin: 580457.9 ymin: 674172.8 xmax: 585934 ymax: 678739.2
  CRS:            NA
  First 10 features:
      label                           geom
  1  window POLYGON ((584712 674237.1, ...
  2   point      POINT (582518.4 676886.2)
  3   point        POINT (581823 677422.7)
  4   point        POINT (582131 676937.9)
  5   point        POINT (582111.9 677420)
  6   point      POINT (582585.1 677509.7)
  7   point      POINT (582302.3 677521.6)
  8   point      POINT (583167.2 676730.5)
  9   point      POINT (583584.5 677207.1)
  10  point      POINT (583117.8 676850.3)
  > 
  > # multipolygon: https://github.com/r-spatial/sf/issues/1161
  > window = read_sf(system.file("shape/nc.shp", package = "sf")) %>%
  +   st_transform(32119)
  Error in update_tibble_attrs(x, ...) : 
    object 'tibble_update_attrs' not found
  Calls: %>% ... process_cpl_read_ogr -> <Anonymous> -> update_tibble_attrs
  Execution halted
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > suppressPackageStartupMessages(library(sf))
  > 
  > test_check("sf")
  -- 1. Error: binary operations work on sf objects with common column names (@tes
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::st_as_sf(tibble::as_tibble(sf1))
   3. tibble:::as_tibble.data.frame(sf1)
   4. tibble:::lst_to_tibble(unclass(x), .rows, .name_repair)
   5. tibble:::recycle_columns(x, .rows, lengths)
   6. tibble::new_tibble(x, nrow = nrow, subclass = NULL)
   7. tibble:::update_tibble_attrs(x, ...)
  
  Cannot open layer foo
  Reading layer `nospatial' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\gpkg\nospatial.gpkg' using driver `GPKG'
  Reading layer `nospatial' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\gpkg\nospatial.gpkg' using driver `GPKG'
  -- 2. Error: reading non-spatial table works (@test_read.R#187)  ---------------
  object 'tibble_update_attrs' not found
  Backtrace:
    1. testthat::expect_warning(...)
    9. sf::read_sf(system.file("gpkg/nospatial.gpkg", package = "sf"))
   11. sf:::st_read.character(...)
   12. sf:::process_cpl_read_ogr(...)
   14. tibble:::as_tibble.list(x)
   15. tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
   16. tibble:::recycle_columns(x, .rows, lengths)
   17. tibble::new_tibble(x, nrow = nrow, subclass = NULL)
   18. tibble:::update_tibble_attrs(x, ...)
  
  -- 3. Error: st_sample works (@test_sample.R#4)  -------------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::read_sf(system.file("shape/nc.shp", package = "sf"))
   3. sf:::st_read.character(...)
   4. sf:::process_cpl_read_ogr(...)
   5. tibble::new_tibble(x, nrow = nrow(x))
   6. tibble:::update_tibble_attrs(x, ...)
  
  OGR: Unsupported geometry type
  Reading layer `nc' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\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
  CRS:            4267
  -- 4. Error: Can't convert `M` dimension to sp (@test_sp.R#75)  ----------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::read_sf(system.file("shape/storms_xyzm_feature.shp", package = "sf"))
   3. sf:::st_read.character(...)
   4. sf:::process_cpl_read_ogr(...)
   5. tibble::new_tibble(x, nrow = nrow(x))
   6. tibble:::update_tibble_attrs(x, ...)
  
  -- 5. Error: filter to sfc works (@test_tidy.R#12)  ----------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. tibble::tibble(...)
   2. tibble:::tibble_quos(xs[!is_null], .rows, .name_repair)
   3. tibble::new_tibble(output, nrow = first_size %||% 0L)
   4. tibble:::update_tibble_attrs(x, ...)
  
  -- 6. Error: separate and unite work (@test_tidy.R#25)  ------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
    1. testthat::expect_true(...)
    9. tidyr::separate(., CNTY_ID, c("a", "b"), sep = 2)
   15. tidyr:::separate.data.frame(...)
   16. tidyr:::str_separate(...)
   18. tibble:::as_tibble.list(out)
   19. tibble:::lst_to_tibble(x, .rows, .name_repair, col_lengths(x))
   20. tibble:::recycle_columns(x, .rows, lengths)
   21. tibble::new_tibble(x, nrow = nrow, subclass = NULL)
   22. tibble:::update_tibble_attrs(x, ...)
  
  -- 7. Error: group/ungroup works (@test_tidy.R#53)  ----------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. tibble::tibble(...)
   2. tibble:::tibble_quos(xs[!is_null], .rows, .name_repair)
   3. tibble::new_tibble(output, nrow = first_size %||% 0L)
   4. tibble:::update_tibble_attrs(x, ...)
  
  -- 8. Error: sample_n etc work (@test_tidy.R#60)  ------------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. tibble::tibble(...)
   2. tibble:::tibble_quos(xs[!is_null], .rows, .name_repair)
   3. tibble::new_tibble(output, nrow = first_size %||% 0L)
   4. tibble:::update_tibble_attrs(x, ...)
  
  -- 9. Error: st_intersection of tbl returns tbl (@test_tidy.R#70)  -------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::read_sf(system.file("shape/nc.shp", package = "sf"))
   3. sf:::st_read.character(...)
   4. sf:::process_cpl_read_ogr(...)
   5. tibble::new_tibble(x, nrow = nrow(x))
   6. tibble:::update_tibble_attrs(x, ...)
  
  -- 10. Error: unnest works  ----------------------------------------------------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::read_sf(system.file("shape/nc.shp", package = "sf"))
   3. sf:::st_read.character(...)
   4. sf:::process_cpl_read_ogr(...)
   5. tibble::new_tibble(x, nrow = nrow(x))
   6. tibble:::update_tibble_attrs(x, ...)
  
  XXX: path0=D:\temp\RtmpI7MMaP\file1a03418b47168.nc path=D:\temp\RtmpI7MMaP\file1a03418b47168.nc
  Failed to create feature 1 in x
  Failed to create feature 1 in x
  -- 11. Error: FID feature ID gets written and read (@test_write.R#108)  --------
  object 'tibble_update_attrs' not found
  Backtrace:
   1. sf::read_sf(...)
   3. sf:::st_read.character(...)
   4. sf:::process_cpl_read_ogr(...)
   5. tibble::new_tibble(x, nrow = nrow(x))
   6. tibble:::update_tibble_attrs(x, ...)
  
  Reading layer `storms_xyzm' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\shape\storms_xyzm.shp' using driver `ESRI Shapefile'
  Simple feature collection with 71 features and 0 fields
  geometry type:  LINESTRING
  dimension:      XYM
  bbox:           xmin: -102.2 ymin: 8.3 xmax: 0 ymax: 59.5
  m_range:        zmin: 924 zmax: 1017
  CRS:            NA
  Reading layer `storms_xyz' from data source `D:\temp\RtmpMtDr4K\RLIBS_1202c15d02a26\sf\shape\storms_xyz.shp' using driver `ESRI Shapefile'
  Simple feature collection with 71 features and 0 fields
  geometry type:  LINESTRING
  dimension:      XYZ
  bbox:           xmin: -102.2 ymin: 8.3 xmax: 0 ymax: 59.5
  z_range:        zmin: 924 zmax: 1017
  CRS:            NA
  == testthat results  ===========================================================
  [ OK: 691 | SKIPPED: 53 | WARNINGS: 2 | FAILED: 11 ]
  1. Error: binary operations work on sf objects with common column names (@test_geos.R#259) 
  2. Error: reading non-spatial table works (@test_read.R#187) 
  3. Error: st_sample works (@test_sample.R#4) 
  4. Error: Can't convert `M` dimension to sp (@test_sp.R#75) 
  5. Error: filter to sfc works (@test_tidy.R#12) 
  6. Error: separate and unite work (@test_tidy.R#25) 
  7. Error: group/ungroup works (@test_tidy.R#53) 
  8. Error: sample_n etc work (@test_tidy.R#60) 
  9. Error: st_intersection of tbl returns tbl (@test_tidy.R#70) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted