CRAN Package Check Results for Package stars

Last updated on 2021-12-07 10:50:37 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.5-4 15.23 286.12 301.35 ERROR
r-devel-linux-x86_64-debian-gcc 0.5-4 12.34 211.98 224.32 ERROR
r-devel-linux-x86_64-fedora-clang 0.5-4 427.71 NOTE
r-devel-linux-x86_64-fedora-gcc 0.5-4 437.17 NOTE
r-devel-windows-x86_64-new-UL 0.5-4 38.00 476.00 514.00 NOTE
r-devel-windows-x86_64-new-TK 0.5-4 ERROR
r-devel-windows-x86_64-old 0.5-4 25.00 334.00 359.00 ERROR
r-patched-linux-x86_64 0.5-4 14.57 338.64 353.21 NOTE
r-release-linux-x86_64 0.5-4 15.61 338.15 353.76 NOTE
r-release-macos-arm64 0.5-4 NOTE
r-release-macos-x86_64 0.5-4 NOTE
r-release-windows-ix86+x86_64 0.5-4 21.00 445.00 466.00 NOTE
r-oldrel-macos-x86_64 0.5-4 NOTE
r-oldrel-windows-ix86+x86_64 0.5-4 30.00 450.00 480.00 NOTE

Check Details

Version: 0.5-4
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'starsdata'
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64-new-UL, r-devel-windows-x86_64-new-TK, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-ix86+x86_64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64

Version: 0.5-4
Check: examples
Result: ERROR
    Running examples in 'stars-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: aggregate.stars
    > ### Title: spatially or temporally aggregate stars object
    > ### Aliases: aggregate.stars aggregate
    >
    > ### ** Examples
    >
    > # aggregate time dimension in format Date
    > tif = system.file("tif/L7_ETMs.tif", package = "stars")
    > t1 = as.Date("2018-07-31")
    > x = read_stars(c(tif, tif, tif, tif), along = list(time = c(t1, t1+1, t1+2, t1+3)))[,1:30,1:30]
    > st_get_dimension_values(x, "time")
    [1] "2018-07-31" "2018-08-01" "2018-08-02" "2018-08-03"
    > x_agg_time = aggregate(x, by = t1 + c(0, 2, 4), FUN = max)
    >
    > # aggregate time dimension in format Date - interval
    > by_t = "2 days"
    > x_agg_time2 = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_time2, "time")
    [1] "2018-07-31" "2018-08-02"
    > x_agg_time - x_agg_time2
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -109 -13 3 1.896111 18 90 5400
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    >
    > # aggregate time dimension in format POSIXct
    > x = st_set_dimensions(x, 4, values = as.POSIXct(c("2018-07-31",
    + "2018-08-01",
    + "2018-08-02",
    + "2018-08-03")),
    + names = "time")
    > by_t = as.POSIXct(c("2018-07-31", "2018-08-02"))
    > x_agg_posix = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_posix, "time")
    [1] "2018-07-31 CEST" "2018-08-02 CEST"
    > x_agg_time - x_agg_posix
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -104 -13 3 1.943889 18 90 10800
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > aggregate(x, "2 days", mean)
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
    L7_ETMs.tif 17 43 58 57.58796 70 145
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 2 2018-07-31 CEST 2 days POSIXct NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > # Spatial aggregation, see https://github.com/r-spatial/stars/issues/299
    > prec_file = system.file("nc/test_stageiv_xyt.nc", package = "stars")
    > prec = read_ncdf(prec_file, curvilinear = c("lon", "lat"))
    no 'var' specified, using Total_precipitation_surface_1_Hour_Accumulation
    other available variables:
     time_bounds, lon, lat, time
    No projection information found in nc file.
     Coordinate variable units found to be degrees,
     assuming WGS84 Lat/Lon.
    Warning in .get_nc_dimensions(dimensions, coord_var = all_coord_var, coords = coords, :
     bounds for time seem to be reversed; reverting them
    Error: C stack usage 15939280 is too close to the limit
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.5-4
Check: tests
Result: ERROR
     Running 'aggregate.R' [4s/5s]
     Comparing 'aggregate.Rout' to 'aggregate.Rout.save' ...4c4
    < Linking to GEOS 3.10.1, GDAL 3.3.3, PROJ 8.2.0
    ---
    > Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
    57c57
    < file4821417960cd.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' [2s/3s]
     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' [6s/8s]
     Comparing 'crop.Rout' to 'crop.Rout.save' ... OK
     Running 'curvilinear.R' [2s/2s]
     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' [2s/3s]
     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' [4s/5s]
     Comparing 'dimensions.Rout' to 'dimensions.Rout.save' ... OK
     Running 'extract.R' [2s/3s]
     Comparing 'extract.Rout' to 'extract.Rout.save' ... OK
     Running 'gridtypes.R' [2s/3s]
     Running 'nc.R' [3s/4s]
     Comparing 'nc.Rout' to 'nc.Rout.save' ... OK
     Running 'plot.R' [4s/5s]
     Comparing 'plot.Rout' to 'plot.Rout.save' ... OK
     Running 'predict.R' [7s/8s]
     Comparing 'predict.Rout' to 'predict.Rout.save' ... OK
     Running 'proxy.R' [9s/11s]
     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' [14s/16s]
     Comparing 'raster.Rout' to 'raster.Rout.save' ... OK
     Running 'rasterize.R' [3s/3s]
     Comparing 'rasterize.Rout' to 'rasterize.Rout.save' ... OK
     Running 'rectilinear.R' [3s/4s]
     Comparing 'rectilinear.Rout' to 'rectilinear.Rout.save' ... OK
     Running 'redimension.R' [3s/4s]
     Comparing 'redimension.Rout' to 'redimension.Rout.save' ... OK
     Running 'sf.R' [3s/5s]
     Comparing 'sf.Rout' to 'sf.Rout.save' ... OK
     Running 'sp.R' [3s/4s]
     Comparing 'sp.Rout' to 'sp.Rout.save' ... OK
     Running 'spacetime.R' [4s/6s]
     Comparing 'spacetime.Rout' to 'spacetime.Rout.save' ... OK
     Running 'spatstat.R' [5s/7s]
     Comparing 'spatstat.Rout' to 'spatstat.Rout.save' ... OK
     Running 'stars.R' [10s/12s]
     Running 'subset.R' [3s/4s]
     Comparing 'subset.Rout' to 'subset.Rout.save' ... OK
     Running 'testthat.R' [25s/34s]
     Running 'tidy.R' [11s/14s]
     Comparing 'tidy.Rout' to 'tidy.Rout.save' ... OK
     Running 'transform.R' [2s/3s]
     Running 'warp.R' [2s/4s]
     Comparing 'warp.Rout' to 'warp.Rout.save' ... OK
     Running 'write.R' [3s/4s]
     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 15941856 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 15938400 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 15940256 is too close to the limit
     -- Error (test_ncdf.R:87:1): curvilinear ---------------------------------------
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15941360 is too close to the limit
     -- Error (test_ncdf.R:109:1): curvilinear broked -------------------------------
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15940864 is too close to the limit
     -- Error (test_ncdf.R:167:1): curvilinear 2 ------------------------------------
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15938480 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 15939136 is too close to the limit
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.5-4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'stars1.Rmd' using rmarkdown
    Error: processing vignette 'stars1.Rmd' failed with diagnostics:
    C stack usage 15939792 is too close to the limit
    --- failed re-building 'stars1.Rmd'
    
    --- re-building 'stars2.Rmd' using rmarkdown
    --- finished re-building 'stars2.Rmd'
    
    --- re-building 'stars3.Rmd' using rmarkdown
    --- finished re-building 'stars3.Rmd'
    
    --- re-building 'stars4.Rmd' using rmarkdown
    --- finished re-building 'stars4.Rmd'
    
    --- re-building 'stars5.Rmd' using rmarkdown
    Error: processing vignette 'stars5.Rmd' failed with diagnostics:
    C stack usage 15939920 is too close to the limit
    --- failed re-building 'stars5.Rmd'
    
    --- re-building 'stars6.Rmd' using rmarkdown
    --- finished re-building 'stars6.Rmd'
    
    --- re-building 'stars7.Rmd' using rmarkdown
    --- finished re-building 'stars7.Rmd'
    
    SUMMARY: processing the following files failed:
     'stars1.Rmd' 'stars5.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.5-4
Check: examples
Result: ERROR
    Running examples in ‘stars-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: aggregate.stars
    > ### Title: spatially or temporally aggregate stars object
    > ### Aliases: aggregate.stars aggregate
    >
    > ### ** Examples
    >
    > # aggregate time dimension in format Date
    > tif = system.file("tif/L7_ETMs.tif", package = "stars")
    > t1 = as.Date("2018-07-31")
    > x = read_stars(c(tif, tif, tif, tif), along = list(time = c(t1, t1+1, t1+2, t1+3)))[,1:30,1:30]
    > st_get_dimension_values(x, "time")
    [1] "2018-07-31" "2018-08-01" "2018-08-02" "2018-08-03"
    > x_agg_time = aggregate(x, by = t1 + c(0, 2, 4), FUN = max)
    >
    > # aggregate time dimension in format Date - interval
    > by_t = "2 days"
    > x_agg_time2 = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_time2, "time")
    [1] "2018-07-31" "2018-08-02"
    > x_agg_time - x_agg_time2
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -109 -13 3 1.896111 18 90 5400
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    >
    > # aggregate time dimension in format POSIXct
    > x = st_set_dimensions(x, 4, values = as.POSIXct(c("2018-07-31",
    + "2018-08-01",
    + "2018-08-02",
    + "2018-08-03")),
    + names = "time")
    > by_t = as.POSIXct(c("2018-07-31", "2018-08-02"))
    > x_agg_posix = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_posix, "time")
    [1] "2018-07-31 CEST" "2018-08-02 CEST"
    > x_agg_time - x_agg_posix
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -104 -13 3 1.943889 18 90 10800
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > aggregate(x, "2 days", mean)
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
    L7_ETMs.tif 17 43 58 57.58796 70 145
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 2 2018-07-31 CEST 2 days POSIXct NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > # Spatial aggregation, see https://github.com/r-spatial/stars/issues/299
    > prec_file = system.file("nc/test_stageiv_xyt.nc", package = "stars")
    > prec = read_ncdf(prec_file, curvilinear = c("lon", "lat"))
    no 'var' specified, using Total_precipitation_surface_1_Hour_Accumulation
    other available variables:
     time_bounds, lon, lat, time
    No projection information found in nc file.
     Coordinate variable units found to be degrees,
     assuming WGS84 Lat/Lon.
    Warning in .get_nc_dimensions(dimensions, coord_var = all_coord_var, coords = coords, :
     bounds for time seem to be reversed; reverting them
    Error: C stack usage 15941824 is too close to the limit
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.5-4
Check: tests
Result: ERROR
     Running ‘aggregate.R’ [3s/5s]
     Comparing ‘aggregate.Rout’ to ‘aggregate.Rout.save’ ...4c4
    < Linking to GEOS 3.10.1, GDAL 3.3.3, PROJ 8.2.0
    ---
    > Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
    57c57
    < file21d7e11cb6e1e5.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’ [2s/4s]
     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’ [4s/6s]
     Comparing ‘crop.Rout’ to ‘crop.Rout.save’ ... OK
     Running ‘curvilinear.R’ [1s/2s]
     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’ [2s/3s]
     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’ [3s/5s]
     Comparing ‘dimensions.Rout’ to ‘dimensions.Rout.save’ ... OK
     Running ‘extract.R’ [2s/2s]
     Comparing ‘extract.Rout’ to ‘extract.Rout.save’ ... OK
     Running ‘gridtypes.R’ [2s/3s]
     Running ‘nc.R’ [2s/4s]
     Comparing ‘nc.Rout’ to ‘nc.Rout.save’ ... OK
     Running ‘plot.R’ [3s/4s]
     Comparing ‘plot.Rout’ to ‘plot.Rout.save’ ... OK
     Running ‘predict.R’ [5s/7s]
     Comparing ‘predict.Rout’ to ‘predict.Rout.save’ ... OK
     Running ‘proxy.R’ [7s/10s]
     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’ [10s/17s]
     Comparing ‘raster.Rout’ to ‘raster.Rout.save’ ... OK
     Running ‘rasterize.R’ [2s/4s]
     Comparing ‘rasterize.Rout’ to ‘rasterize.Rout.save’ ... OK
     Running ‘rectilinear.R’ [2s/5s]
     Comparing ‘rectilinear.Rout’ to ‘rectilinear.Rout.save’ ... OK
     Running ‘redimension.R’ [3s/5s]
     Comparing ‘redimension.Rout’ to ‘redimension.Rout.save’ ... OK
     Running ‘sf.R’ [3s/5s]
     Comparing ‘sf.Rout’ to ‘sf.Rout.save’ ... OK
     Running ‘sp.R’ [2s/4s]
     Comparing ‘sp.Rout’ to ‘sp.Rout.save’ ... OK
     Running ‘spacetime.R’ [3s/5s]
     Comparing ‘spacetime.Rout’ to ‘spacetime.Rout.save’ ... OK
     Running ‘spatstat.R’ [4s/6s]
     Comparing ‘spatstat.Rout’ to ‘spatstat.Rout.save’ ... OK
     Running ‘stars.R’ [7s/13s]
     Running ‘subset.R’ [3s/5s]
     Comparing ‘subset.Rout’ to ‘subset.Rout.save’ ... OK
     Running ‘testthat.R’ [19s/33s]
     Running ‘tidy.R’ [7s/14s]
     Comparing ‘tidy.Rout’ to ‘tidy.Rout.save’ ... OK
     Running ‘transform.R’ [2s/2s]
     Running ‘warp.R’ [2s/4s]
     Comparing ‘warp.Rout’ to ‘warp.Rout.save’ ... OK
     Running ‘write.R’ [2s/3s]
     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 15942416 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 15942560 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 15938848 is too close to the limit
     ── Error (test_ncdf.R:87:1): curvilinear ───────────────────────────────────────
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15939456 is too close to the limit
     ── Error (test_ncdf.R:109:1): curvilinear broked ───────────────────────────────
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15944768 is too close to the limit
     ── Error (test_ncdf.R:167:1): curvilinear 2 ────────────────────────────────────
     <CStackOverflowError/stackOverflowError/error/condition>
     Error: C stack usage 15939264 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 15943072 is too close to the limit
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.5-4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘stars1.Rmd’ using rmarkdown
    Error: processing vignette ‘stars1.Rmd’ failed with diagnostics:
    C stack usage 15940704 is too close to the limit
    --- failed re-building ‘stars1.Rmd’
    
    --- re-building ‘stars2.Rmd’ using rmarkdown
    --- finished re-building ‘stars2.Rmd’
    
    --- re-building ‘stars3.Rmd’ using rmarkdown
    --- finished re-building ‘stars3.Rmd’
    
    --- re-building ‘stars4.Rmd’ using rmarkdown
    --- finished re-building ‘stars4.Rmd’
    
    --- re-building ‘stars5.Rmd’ using rmarkdown
    Error: processing vignette ‘stars5.Rmd’ failed with diagnostics:
    C stack usage 15939264 is too close to the limit
    --- failed re-building ‘stars5.Rmd’
    
    --- re-building ‘stars6.Rmd’ using rmarkdown
    --- finished re-building ‘stars6.Rmd’
    
    --- re-building ‘stars7.Rmd’ using rmarkdown
    --- finished re-building ‘stars7.Rmd’
    
    SUMMARY: processing the following files failed:
     ‘stars1.Rmd’ ‘stars5.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.5-4
Check: installed package size
Result: NOTE
     installed size is 8.8Mb
     sub-directories of 1Mb or more:
     doc 2.3Mb
     nc 4.5Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-windows-x86_64-new-UL, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-ix86+x86_64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64

Version: 0.5-4
Check: examples
Result: ERROR
    Running examples in 'stars-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: aggregate.stars
    > ### Title: spatially or temporally aggregate stars object
    > ### Aliases: aggregate.stars aggregate
    >
    > ### ** Examples
    >
    > # aggregate time dimension in format Date
    > tif = system.file("tif/L7_ETMs.tif", package = "stars")
    > t1 = as.Date("2018-07-31")
    > x = read_stars(c(tif, tif, tif, tif), along = list(time = c(t1, t1+1, t1+2, t1+3)))[,1:30,1:30]
    > st_get_dimension_values(x, "time")
    [1] "2018-07-31" "2018-08-01" "2018-08-02" "2018-08-03"
    > x_agg_time = aggregate(x, by = t1 + c(0, 2, 4), FUN = max)
    >
    > # aggregate time dimension in format Date - interval
    > by_t = "2 days"
    > x_agg_time2 = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_time2, "time")
    [1] "2018-07-31" "2018-08-02"
    > x_agg_time - x_agg_time2
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -109 -13 3 1.896111 18 90 5400
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    >
    > # aggregate time dimension in format POSIXct
    > x = st_set_dimensions(x, 4, values = as.POSIXct(c("2018-07-31",
    + "2018-08-01",
    + "2018-08-02",
    + "2018-08-03")),
    + names = "time")
    > by_t = as.POSIXct(c("2018-07-31", "2018-08-02"))
    > x_agg_posix = aggregate(x, by = by_t, FUN = max)
    > st_get_dimension_values(x_agg_posix, "time")
    [1] "2018-07-31 CEST" "2018-08-02 CEST"
    > x_agg_time - x_agg_posix
    Warning in FUN(X[[i]], ...) :
     longer object length is not a multiple of shorter object length
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
    L7_ETMs.tif -104 -13 3 1.943889 18 90 10800
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 3 2018-07-31 2 days Date NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > aggregate(x, "2 days", mean)
    stars object with 4 dimensions and 1 attribute
    attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
    L7_ETMs.tif 17 43 58 57.58796 70 145
    dimension(s):
     from to offset delta refsys point values x/y
    time 1 2 2018-07-31 CEST 2 days POSIXct NA NULL
    x 1 30 288776 28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [x]
    y 1 30 9120761 -28.5 SIRGAS 2000 / UTM zone 25S FALSE NULL [y]
    band 1 6 NA NA NA NA NULL
    > # Spatial aggregation, see https://github.com/r-spatial/stars/issues/299
    > prec_file = system.file("nc/test_stageiv_xyt.nc", package = "stars")
    > prec = read_ncdf(prec_file, curvilinear = c("lon", "lat"))
    no 'var' specified, using Total_precipitation_surface_1_Hour_Accumulation
    other available variables:
     time_bounds, lon, lat, time
    No projection information found in nc file.
     Coordinate variable units found to be degrees,
     assuming WGS84 Lat/Lon.
    Warning in .get_nc_dimensions(dimensions, coord_var = all_coord_var, coords = coords, :
     bounds for time seem to be reversed; reverting them
    Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
    Execution halted
Flavor: r-devel-windows-x86_64-new-TK

Version: 0.5-4
Check: tests
Result: ERROR
     Running 'aggregate.R'
     Comparing 'aggregate.Rout' to 'aggregate.Rout.save' ...4c4
    < Linking to GEOS 3.9.1, GDAL 3.3.2, PROJ 7.2.1
    ---
    > Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
    57c57
    < file22b8c2b3437f2.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'
     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' ...7,19d6
    < Warning messages:
    < 1: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
    < 2: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
    < 3: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
    < 4: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
    < 5: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
    < 6: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver), :
    < GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
     Running 'extract.R'
     Comparing 'extract.Rout' to 'extract.Rout.save' ... OK
     Running 'gridtypes.R'
    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: evaluation nested too deeply: infinite recursion / options(expressions=)?
     Execution halted
Flavor: r-devel-windows-x86_64-new-TK

Version: 0.5-4
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building 'stars1.Rmd' using rmarkdown
    Error: processing vignette 'stars1.Rmd' failed with diagnostics:
    evaluation nested too deeply: infinite recursion / options(expressions=)?
    --- failed re-building 'stars1.Rmd'
    
    --- re-building 'stars2.Rmd' using rmarkdown
    --- finished re-building 'stars2.Rmd'
    
    --- re-building 'stars3.Rmd' using rmarkdown
    --- finished re-building 'stars3.Rmd'
    
    --- re-building 'stars4.Rmd' using rmarkdown
    --- finished re-building 'stars4.Rmd'
    
    --- re-building 'stars5.Rmd' using rmarkdown
    Error: processing vignette 'stars5.Rmd' failed with diagnostics:
    evaluation nested too deeply: infinite recursion / options(expressions=)?
    --- failed re-building 'stars5.Rmd'
    
    --- re-building 'stars6.Rmd' using rmarkdown
    --- finished re-building 'stars6.Rmd'
    
    --- re-building 'stars7.Rmd' using rmarkdown
    --- finished re-building 'stars7.Rmd'
    
    SUMMARY: processing the following files failed:
     'stars1.Rmd' 'stars5.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-windows-x86_64-new-TK