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 BST" "2018-08-02 BST"
> 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 BST 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  19922980 is too close to the limit
Execution halted