Skip to content

bug fix with aggregate #711

@eborgnine

Description

@eborgnine

following up on

https://stackoverflow.com/questions/77311184/aggregating-r-stars-with-vector-valued-output/77447314#77447314

line 185 to 188 in aggregate.R, I think bind should be rbind in either case. the code below shows the 0% quantile is different from min, but when I change to rbind it's ok.

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]

xmin = aggregate(x, by = '2 days', FUN = min) 
xrange = aggregate(x, by = '2 days', FUN = quantile) 

xDfmin = as.data.frame(xmin)
xDfrange = as.data.frame(xrange)

xDfmin[1:7,]
xDfrange[xDfrange$quantile=='0%',][1:7,]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions