Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix with aggregate #711

Open
eborgnine opened this issue Sep 25, 2024 · 0 comments
Open

bug fix with aggregate #711

eborgnine opened this issue Sep 25, 2024 · 0 comments

Comments

@eborgnine
Copy link

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,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant