Running ‘aggregate.R’
  Comparing ‘aggregate.Rout’ to ‘aggregate.Rout.save’ ...4c4
< Linking to GEOS 3.8.1, GDAL 3.0.4, PROJ 6.3.2
---
> Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
57c57
< file18adef6c7c2cca.tif    33  199.25  365.5 365.5  531.75  698
---
> file46ef83309cd.tif    33  199.25  365.5 365.5  531.75  698
  Running ‘area.R’
  Comparing ‘area.Rout’ to ‘area.Rout.save’ ...51a52,64
> /PRODUCT/longitude, 
> /PRODUCT/latitude, 
> /PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/nitrogendioxide_summed_total_column, 
> stars object with 2 dimensions and 1 attribute
> attribute(s):
>                Min.  1st Qu.   Median     Mean  3rd Qu.      Max.
> area [m^2] 25983110 28008871 35690854 42912281 54562137 100943458
> dimension(s):
>   from  to offset delta refsys point                                 values x/y
> x    1 450     NA    NA WGS 84    NA [450x278] -5.81066 [°],...,30.9468 [°] [x]
> y    1 278     NA    NA WGS 84    NA  [450x278] 28.3605 [°],...,51.4686 [°] [y]
> curvilinear grid
> There were 15 warnings (use warnings() to see them)
  Running ‘crop.R’ [8s/10s]
  Comparing ‘crop.Rout’ to ‘crop.Rout.save’ ... OK
  Running ‘curvilinear.R’
  Comparing ‘curvilinear.Rout’ to ‘curvilinear.Rout.save’ ...54a55,88
> /PRODUCT/longitude, 
> /PRODUCT/latitude, 
> /PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/nitrogendioxide_summed_total_column, 
> stars object with 3 dimensions and 1 attribute
> attribute(s):
>                                            Min.      1st Qu.       Median
> nitrogendioxide_summed_total_c...  3.650813e-05 7.451281e-05 8.296968e-05
>                                            Mean      3rd Qu.         Max. NA's
> nitrogendioxide_summed_total_c...  8.581399e-05 9.397442e-05 0.0004535302  330
> dimension(s):
>      from  to offset delta refsys point                                 values
> x       1 450     NA    NA WGS 84    NA [450x278] -5.81066 [°],...,30.9468 [°]
> y       1 278     NA    NA WGS 84    NA  [450x278] 28.3605 [°],...,51.4686 [°]
> time    1   1     NA    NA     NA    NA                                   NULL
>      x/y
> x    [x]
> y    [y]
> time    
> curvilinear grid
> stars object with 3 dimensions and 1 attribute
> attribute(s):
>                                            Min.      1st Qu.       Median
> nitrogendioxide_summed_total_c...  4.383528e-05 7.480038e-05 8.344652e-05
>                                            Mean      3rd Qu.        Max. NA's
> nitrogendioxide_summed_total_c...  8.607374e-05 9.398567e-05 0.000192237   32
> dimension(s):
>      from to offset delta refsys point                               values x/y
> x       1 50     NA    NA WGS 84    NA [50x31] -5.81066 [°],...,30.1405 [°] [x]
> y       1 31     NA    NA WGS 84    NA  [50x31] 28.7828 [°],...,51.4686 [°] [y]
> time    1  1     NA    NA     NA    NA                                 NULL    
> curvilinear grid
> null device 
>           1 
> There were 15 warnings (use warnings() to see them)
  Running ‘datasets.R’
  Comparing ‘datasets.Rout’ to ‘datasets.Rout.save’ ...30,32c30,38
< Warning message:
< In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
<   there is no package called 'starsdata'
---
> stars_proxy object with 1 attribute in 1 file(s):
> $`MTD_MSIL1C.xml:10m:EPSG_32632`
> [1] "[...]/MTD_MSIL1C.xml:10m:EPSG_32632"
> 
> dimension(s):
>      from    to offset delta                refsys point    values x/y
> x       1 10980  3e+05    10 WGS 84 / UTM zone 32N    NA      NULL [x]
> y       1 10980  6e+06   -10 WGS 84 / UTM zone 32N    NA      NULL [y]
> band    1     4     NA    NA                    NA    NA B4,...,B8    
  Running ‘dimensions.R’
  Comparing ‘dimensions.Rout’ to ‘dimensions.Rout.save’ ... OK
  Running ‘extract.R’
  Comparing ‘extract.Rout’ to ‘extract.Rout.save’ ... OK
  Running ‘gridtypes.R’
  Running ‘nc.R’
  Comparing ‘nc.Rout’ to ‘nc.Rout.save’ ...190,191c190,191
<         SCOPE["unknown"],
<         AREA["North America - NAD27"],
---
>         SCOPE["Geodesy."],
>         AREA["North and central America: Antigua and Barbuda - onshore. Bahamas - onshore plus offshore over internal continental shelf only. Belize - onshore. British Virgin Islands - onshore. Canada onshore - Alberta, British Columbia, Manitoba, New Brunswick, Newfoundland and Labrador, Northwest Territories, Nova Scotia, Nunavut, Ontario, Prince Edward Island, Quebec, Saskatchewan and Yukon - plus offshore east coast. Cuba - onshore and offshore. El Salvador - onshore. Guatemala - onshore. Honduras - onshore. Panama - onshore. Puerto Rico - onshore. Mexico - onshore plus offshore east coast. Nicaragua - onshore. United States (USA) onshore and offshore - Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware, Florida, Georgia, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington, West Virginia, Wisconsin and Wyoming - plus offshore . US Virgin Islands - onshore."],
  Running ‘plot.R’
  Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
  Running ‘predict.R’ [8s/12s]
  Comparing ‘predict.Rout’ to ‘predict.Rout.save’ ... OK
  Running ‘proxy.R’ [16s/21s]
  Comparing ‘proxy.Rout’ to ‘proxy.Rout.save’ ...266a267,345
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> stars_proxy object with 2 attributes in 18 file(s):
> $sst
> [1] "[...]/avhrr-only-v2.19810901.nc:sst" "[...]/avhrr-only-v2.19810902.nc:sst"
> [3] "[...]/avhrr-only-v2.19810903.nc:sst" "[...]/avhrr-only-v2.19810904.nc:sst"
> [5] "[...]/avhrr-only-v2.19810905.nc:sst" "[...]/avhrr-only-v2.19810906.nc:sst"
> [7] "[...]/avhrr-only-v2.19810907.nc:sst" "[...]/avhrr-only-v2.19810908.nc:sst"
> [9] "[...]/avhrr-only-v2.19810909.nc:sst"
> 
> $anom
> [1] "[...]/avhrr-only-v2.19810901.nc:anom"
> [2] "[...]/avhrr-only-v2.19810902.nc:anom"
> [3] "[...]/avhrr-only-v2.19810903.nc:anom"
> [4] "[...]/avhrr-only-v2.19810904.nc:anom"
> [5] "[...]/avhrr-only-v2.19810905.nc:anom"
> [6] "[...]/avhrr-only-v2.19810906.nc:anom"
> [7] "[...]/avhrr-only-v2.19810907.nc:anom"
> [8] "[...]/avhrr-only-v2.19810908.nc:anom"
> [9] "[...]/avhrr-only-v2.19810909.nc:anom"
> 
> dimension(s):
>      from   to         offset  delta  refsys point values x/y
> x       1 1440              0   0.25      NA    NA   NULL [x]
> y       1  720             90  -0.25      NA    NA   NULL [y]
> zlev    1    1          0 [m]     NA      NA    NA   NULL    
> time    1    9 1981-09-01 UTC 1 days POSIXct    NA   NULL    
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> sst, anom, 
> stars object with 4 dimensions and 2 attributes
> attribute(s), summary of first 1e+05 cells:
>             Min. 1st Qu. Median       Mean 3rd Qu. Max.  NA's
> sst [C*°]  -1.80   -1.19  -1.05 -0.3201670   -0.20 9.36 13360
> anom [C*°] -4.69   -0.06   0.52  0.2299385    0.71 3.70 13360
> dimension(s):
>      from   to         offset  delta  refsys point values x/y
> x       1 1440              0   0.25      NA    NA   NULL [x]
> y       1  720             90  -0.25      NA    NA   NULL [y]
> zlev    1    1          0 [m]     NA      NA    NA   NULL    
> time    1    9 1981-09-01 UTC 1 days POSIXct    NA   NULL    
> stars object with 5 dimensions and 1 attribute
> attribute(s), summary of first 1e+05 cells:
>           Min. 1st Qu. Median      Mean 3rd Qu. Max.  NA's
> sst.anom  -1.8   -1.19  -1.05 -0.320167    -0.2 9.36 13360
> dimension(s):
>         from   to         offset  delta  refsys point     values x/y
> x          1 1440              0   0.25      NA    NA       NULL [x]
> y          1  720             90  -0.25      NA    NA       NULL [y]
> zlev       1    1          0 [m]     NA      NA    NA       NULL    
> time       1    9 1981-09-01 UTC 1 days POSIXct    NA       NULL    
> new_dim    1    2             NA     NA      NA    NA sst , anom    
> Error in c.stars_proxy(l[[1]], l[[2]], l[[3]], along = list(times = as.Date("1981-09-01") +  : 
>   for proxy objects, along argument as list is not implemented
> stars_proxy object with 1 attribute in 2 file(s):
> $sst.anom
> [1] "[...]/avhrr-only-v2.19810901.nc:sst" 
> [2] "[...]/avhrr-only-v2.19810901.nc:anom"
> 
> dimension(s):
>       from   to         offset  delta  refsys point values x/y
> x        1 1440              0   0.25      NA    NA   NULL [x]
> y        1  720             90  -0.25      NA    NA   NULL [y]
> zlev     1    1          0 [m]     NA      NA    NA   NULL    
> time     1    1 1981-09-01 UTC     NA POSIXct    NA   NULL    
> times    1    2     1981-09-01 1 days    Date    NA   NULL    
  Running ‘raster.R’ [20s/26s]
  Comparing ‘raster.Rout’ to ‘raster.Rout.save’ ... OK
  Running ‘rasterize.R’
  Comparing ‘rasterize.Rout’ to ‘rasterize.Rout.save’ ... OK
  Running ‘rectilinear.R’
  Comparing ‘rectilinear.Rout’ to ‘rectilinear.Rout.save’ ... OK
  Running ‘redimension.R’
  Comparing ‘redimension.Rout’ to ‘redimension.Rout.save’ ... OK
  Running ‘sf.R’
  Comparing ‘sf.Rout’ to ‘sf.Rout.save’ ... OK
  Running ‘sp.R’
  Comparing ‘sp.Rout’ to ‘sp.Rout.save’ ... OK
  Running ‘spacetime.R’
  Comparing ‘spacetime.Rout’ to ‘spacetime.Rout.save’ ... OK
  Running ‘spatstat.R’
  Comparing ‘spatstat.Rout’ to ‘spatstat.Rout.save’ ... OK
  Running ‘stars.R’ [15s/18s]
  Running ‘subset.R’
  Comparing ‘subset.Rout’ to ‘subset.Rout.save’ ... OK
  Running ‘testthat.R’ [28s/34s]
  Running ‘tidy.R’ [14s/17s]
  Comparing ‘tidy.Rout’ to ‘tidy.Rout.save’ ... OK
  Running ‘transform.R’
  Running ‘warp.R’
  Comparing ‘warp.Rout’ to ‘warp.Rout.save’ ... OK
  Running ‘write.R’
  Comparing ‘write.Rout’ to ‘write.Rout.save’ ... OK
Running the tests in ‘tests/gridtypes.R’ failed.
Complete output:
  > suppressPackageStartupMessages(library(stars))
  > 
  > # regular, but not spatial:
  > d = st_dimensions(a = 1:3, b = 1:3, band = c("foo", "bar"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values
  a       1  3      1     1     NA FALSE     NULL
  b       1  3      1     1     NA FALSE     NULL
  band    1  2     NA    NA     NA FALSE foo, bar
  > as.data.frame(st, add_max=FALSE)[1:4,]
    a b band X
  1 1 1  foo 1
  2 2 1  foo 2
  3 3 1  foo 3
  4 1 2  foo 4
  > try(x <- st_bbox(st)) # error
  Error in st_bbox.dimensions(st_dimensions(obj), ...) : 
    dimensions table does not have x & y, nor an sfc dimension
  > 
  > # regular, geotransform:
  > d = st_dimensions(x = 1:3, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3      1     1     NA FALSE     NULL [x]
  y       1  3      1     1     NA FALSE     NULL [y]
  band    1  2     NA    NA     NA FALSE foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 2.5 1.5  foo 2
  3 3.5 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     3     2 2
  3 3 1  foo     4     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    4    4 
  > 
  > # rectilinear with offset given:
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point              values x/y
  x       1  3     NA    NA     NA FALSE [1,2), [2,4), [4,6) [x]
  y       1  3      1     1     NA FALSE                NULL [y]
  band    1  2     NA    NA     NA FALSE            foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 3.0 1.5  foo 2
  3 5.0 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     4     2 2
  3 4 1  foo     6     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    6    4 
  > 
  > # rectilinear with midpoints given:
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), cell_midpoints = TRUE)
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point                          values x/y
  x       1  3     NA    NA     NA FALSE [0.5,1.5), [1.5,3.0), [3.0,5.0) [x]
  y       1  3    0.5     1     NA FALSE                            NULL [y]
  band    1  2     NA    NA     NA FALSE                        foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
       x y band X
  1 1.00 1  foo 1
  2 2.25 1  foo 2
  3 4.00 1  foo 3
  4 1.00 2  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
      x   y band x_max y_max X
  1 0.5 0.5  foo   1.5   1.5 1
  2 1.5 0.5  foo   3.0   1.5 2
  3 3.0 0.5  foo   5.0   1.5 3
  4 0.5 1.5  foo   1.5   2.5 4
  > st_bbox(st)
  xmin ymin xmax ymax 
   0.5  0.5  5.0  3.5 
  > 
  > # rectilinear with midpoints given, point support
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), cell_midpoints = TRUE, point = TRUE)
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3     NA    NA     NA  TRUE  1, 2, 4 [x]
  y       1  3    0.5     1     NA  TRUE     NULL [y]
  band    1  2     NA    NA     NA  TRUE foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
    x y band X
  1 1 1  foo 1
  2 2 1  foo 2
  3 4 1  foo 3
  4 1 2  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x   y band x_max y_max X
  1 1 0.5  foo     1   1.5 1
  2 2 0.5  foo     2   1.5 2
  3 4 0.5  foo     4   1.5 3
  4 1 1.5  foo     1   2.5 4
  > st_bbox(st)
  xmin ymin xmax ymax 
   1.0  0.5  4.0  3.5 
  > 
  > # rectilinear with start/end given:
  > #xd = stars:::make_intervals(start = c(1,2,4), end = c(2, 4, 8))
  > xd = c(1, 2, 4, 8) # one more than dim of the data array
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point              values x/y
  x       1  3     NA    NA     NA FALSE [1,2), [2,4), [4,8) [x]
  y       1  3      1     1     NA FALSE                NULL [y]
  band    1  2     NA    NA     NA FALSE            foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 3.0 1.5  foo 2
  3 6.0 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     4     2 2
  3 4 1  foo     8     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    8    4 
  > 
  > # with sfc:
  > sfc = st_sfc(st_point(0:1), st_point(2:1), st_point(4:3))
  > d = st_dimensions(x = sfc, y = 1:3, band = c("foo", "bar"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point                                values
  x       1  3     NA    NA     NA  TRUE POINT (0 1), POINT (2 1), POINT (4 3)
  y       1  3      1     1     NA FALSE                                  NULL
  band    1  2     NA    NA     NA FALSE                              foo, bar
  > as.data.frame(st, add_max=FALSE)[1:4,]
              x y band X
  1 POINT (0 1) 1  foo 1
  2 POINT (2 1) 1  foo 2
  3 POINT (4 3) 1  foo 3
  4 POINT (0 1) 2  foo 4
  > st_as_sf(st, long = TRUE)[1:4,]
  Simple feature collection with 4 features and 3 fields
  Geometry type: POINT
  Dimension:     XY
  Bounding box:  xmin: 0 ymin: 1 xmax: 4 ymax: 3
  CRS:           NA
    y band X           x
  1 1  foo 1 POINT (0 1)
  2 1  foo 2 POINT (2 1)
  3 1  foo 3 POINT (4 3)
  4 2  foo 4 POINT (0 1)
  > st_bbox(st)
  xmin ymin xmax ymax 
     0    1    4    3 
  > 
  > # rotated/sheared:
  > d = st_dimensions(x = 1:3, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), affine = c(0.2, -0.2))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3      1     1     NA FALSE     NULL [x]
  y       1  3      1     1     NA FALSE     NULL [y]
  band    1  2     NA    NA     NA FALSE foo, bar    
  sheared raster with parameters: 0.2 -0.2 
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y X
  1 1.6 1.4 1
  2 2.6 1.2 2
  3 3.6 1.0 3
  4 1.8 2.4 4
  > try(as.data.frame(st, add_max=TRUE)[1:4,]) # errors
  Error in st_coordinates.stars(x, add_max = add_max, center = center) : 
    add_max will not work for rotated/shared rasters
  > st_bbox(st)
  xmin ymin xmax ymax 
   1.0  0.4  4.6  4.0 
  > 
  > # curvilinear:
  > set.seed(13531)
  > lon = st_as_stars(matrix(signif(runif(9), 2), 3, 3))
  > lat = st_as_stars(matrix(signif(runif(9), 2), 3, 3))
  > ll = setNames(c(lon, lat), c("lon", "lat"))
  > d = st_dimensions(lon = 1:3, lat = 1:3)
  > a = st_as_stars(list(X = array(1:9, c(3,3))), dimensions = d)
  > (st = st_as_stars(a, curvilinear = ll))
  Error: C stack usage  19927140 is too close to the limit
  Execution halted
Running the tests in ‘tests/stars.R’ failed.
Complete output:
  > Sys.setenv(TZ="UTC")
  > suppressPackageStartupMessages(library(stars))
  > set.seed(13521) # runif
  > tif = system.file("tif/L7_ETMs.tif", package = "stars")
  > (x_ = read_stars(c(tif,tif))) # FIXME: not what you'd expect
  stars object with 3 dimensions and 2 attributes
  attribute(s):
                 Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif       1      54     69 68.91242      86  255
  L7_ETMs.tif.1     1      54     69 68.91242      86  255
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > (x = read_stars(tif))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      54     69 68.91242      86  255
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > image(x)
  > gdal_crs(tif)
  Coordinate Reference System:
    User input: PROJCS["SIRGAS 2000 / UTM zone 25S",GEOGCS["SIRGAS 2000",DATUM["Sistema_de_Referencia_Geocentrico_para_las_AmericaS_2000",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6674"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4674"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","31985"]] 
    wkt:
  PROJCRS["SIRGAS 2000 / UTM zone 25S",
      BASEGEOGCRS["SIRGAS 2000",
          DATUM["Sistema de Referencia Geocentrico para las AmericaS 2000",
              ELLIPSOID["GRS 1980",6378137,298.257222101,
                  LENGTHUNIT["metre",1]]],
          PRIMEM["Greenwich",0,
              ANGLEUNIT["degree",0.0174532925199433]],
          ID["EPSG",4674]],
      CONVERSION["UTM zone 25S",
          METHOD["Transverse Mercator",
              ID["EPSG",9807]],
          PARAMETER["Latitude of natural origin",0,
              ANGLEUNIT["degree",0.0174532925199433],
              ID["EPSG",8801]],
          PARAMETER["Longitude of natural origin",-33,
              ANGLEUNIT["degree",0.0174532925199433],
              ID["EPSG",8802]],
          PARAMETER["Scale factor at natural origin",0.9996,
              SCALEUNIT["unity",1],
              ID["EPSG",8805]],
          PARAMETER["False easting",500000,
              LENGTHUNIT["metre",1],
              ID["EPSG",8806]],
          PARAMETER["False northing",10000000,
              LENGTHUNIT["metre",1],
              ID["EPSG",8807]]],
      CS[Cartesian,2],
          AXIS["easting",east,
              ORDER[1],
              LENGTHUNIT["metre",1]],
          AXIS["northing",north,
              ORDER[2],
              LENGTHUNIT["metre",1]],
      ID["EPSG",31985]]
  > plot(x)
  > plot(x, join_zlim = FALSE)
  > x %>% st_set_dimensions(names = c('a', 'b', 'c'))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      54     69 68.91242      86  255
  dimension(s):
    from  to  offset delta                     refsys point values x/y
  a    1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  b    1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  c    1   6      NA    NA                         NA    NA   NULL    
  > st_get_dimension_values(x, 3)
  [1] 1 2 3 4 5 6
  > 
  > (x1 = st_set_dimensions(x, "band", values = c(1,2,3,4,5,7), names = "band_number", point = TRUE))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      54     69 68.91242      86  255
  dimension(s):
              from  to  offset delta                     refsys point  values x/y
  x              1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE    NULL [x]
  y              1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE    NULL [y]
  band_number    1   6      NA    NA                         NA  TRUE 1,...,7    
  > rbind(c(0.45,0.515), c(0.525,0.605), c(0.63,0.69), c(0.775,0.90), c(1.55,1.75), c(2.08,2.35)) %>%
  + 	units::set_units(um) -> bw # units::set_units(µm) -> bw
  > # set bandwidth midpoint:
  > (x2 = st_set_dimensions(x, "band", values = 0.5 * (bw[,1]+bw[,2]), 
  +    names = "bandwidth_midpoint", point = TRUE))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      54     69 68.91242      86  255
  dimension(s):
                     from  to  offset delta                     refsys point
  x                     1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE
  y                     1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE
  bandwidth_midpoint    1   6      NA    NA                    udunits  TRUE
                                         values x/y
  x                                        NULL [x]
  y                                        NULL [y]
  bandwidth_midpoint 0.4825 [um],...,2.215 [um]    
  > # set bandwidth intervals:
  > (x3 = st_set_dimensions(x, "band", values = make_intervals(bw), names = "bandwidth"))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      54     69 68.91242      86  255
  dimension(s):
            from  to  offset delta                     refsys point
  x            1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE
  y            1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE
  bandwidth    1   6      NA    NA                    udunits    NA
                                            values x/y
  x                                           NULL [x]
  y                                           NULL [y]
  bandwidth [0.45,0.515) [um],...,[2.08,2.35) [um]    
  > 
  > x + x
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     2     108    138 137.8248     172  510
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > x * x
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median    Mean 3rd Qu.  Max.
  L7_ETMs.tif     1    2916   4761 5512.41    7396 65025
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > x[,,,1:3]
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif    21      58     70 70.36041      83  255
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   3      NA    NA                         NA    NA   NULL    
  > x[,1:100,100:200,]
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif    13      54     65 67.21531      77  252
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 100  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y     100 200 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > sqrt(x)
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
  L7_ETMs.tif     1 7.348469 8.306624 8.094006 9.273618 15.96872
  dimension(s):
       from  to  offset delta                     refsys point values x/y
  x       1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y       1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  band    1   6      NA    NA                         NA    NA   NULL    
  > st_apply(x, 3, min)
  stars object with 1 dimensions and 1 attribute
  attribute(s):
       Min. 1st Qu. Median Mean 3rd Qu. Max.
  min     1       3     15 18.5   29.25   47
  dimension(s):
       from to offset delta refsys point values
  band    1  6     NA    NA     NA    NA   NULL
  > st_apply(x, 1:2, max)
  stars object with 2 dimensions and 1 attribute
  attribute(s):
       Min. 1st Qu. Median     Mean 3rd Qu. Max.
  max    55      85     96 99.36018     113  255
  dimension(s):
    from  to  offset delta                     refsys point values x/y
  x    1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y    1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  > st_apply(x, 1:2, range)
  stars object with 3 dimensions and 1 attribute
  attribute(s):
               Min. 1st Qu. Median     Mean 3rd Qu. Max.
  L7_ETMs.tif     1      50     71 72.43565      96  255
  dimension(s):
        from  to  offset delta                     refsys point values x/y
  range    1   2      NA    NA                         NA    NA   NULL    
  x        1 349  288776  28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [x]
  y        1 352 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE   NULL [y]
  > 
  > geomatrix = system.file("tif/geomatrix.tif", package = "stars")
  > x = read_stars(geomatrix)
  > y = st_transform(x, st_crs(4326))
  Error: C stack usage  19922996 is too close to the limit
  Execution halted
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > ## load dependencies
  > library(testthat)
  > suppressPackageStartupMessages(library(stars))
  > 
  > ## test package
  > test_check("stars")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_ncdf.R:64:1): euro cordex extra dimvars ─────────────────────────
  <CStackOverflowError/stackOverflowError/error/condition>
  Error: C stack usage  19931812 is too close to the limit
  ── Error (test_ncdf.R:87:1): curvilinear ───────────────────────────────────────
  <CStackOverflowError/stackOverflowError/error/condition>
  Error: C stack usage  19923044 is too close to the limit
  ── Error (test_ncdf.R:109:1): curvilinear broked ───────────────────────────────
  <CStackOverflowError/stackOverflowError/error/condition>
  Error: C stack usage  19929508 is too close to the limit
  ── Error (test_ncdf.R:167:1): curvilinear 2 ────────────────────────────────────
  <CStackOverflowError/stackOverflowError/error/condition>
  Error: C stack usage  19931428 is too close to the limit
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 84 ]
  Error: Test failures
  Execution halted
Running the tests in ‘tests/transform.R’ failed.
Complete output:
  > suppressPackageStartupMessages(library(stars))
  > suppressPackageStartupMessages(library(lwgeom))
  > geomatrix = system.file("tif/geomatrix.tif", package = "stars")
  > (x = read_stars(geomatrix))
  stars object with 2 dimensions and 1 attribute
  attribute(s):
                 Min. 1st Qu. Median    Mean 3rd Qu. Max.
  geomatrix.tif    74     107    123 126.765     132  255
  dimension(s):
    from to  offset delta                refsys point values x/y
  x    1 20 1841002   1.5 WGS 84 / UTM zone 11N  TRUE   NULL [x]
  y    1 20 1144003  -1.5 WGS 84 / UTM zone 11N  TRUE   NULL [y]
  sheared raster with parameters: -5 -5 
  > new = st_crs(4326)
  > y = st_transform(x, new)
  Error: C stack usage  19929044 is too close to the limit
  Execution halted