Skip to content

Aggregate Function Argument Not Giving different answers #752

@sdewees0523

Description

@sdewees0523

Hello,

Thank you for all your work on this package. I'm currently using aggregate.stars to get different monthly summary statistics and am consistently getting the same pixel values regardless of the value I pass to the FUN argument. Example from one of your example use cases:

 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")
x_agg_time_max= aggregate(x, by = t1 + c(0, 2, 4), FUN = max)
x_agg_time_min = aggregage(x, by = t1+ c(0,2,4, FUN = min)
x_agg_time_mean = aggregate(x, by = t1+c(0,2,4, FUN = min)

plot(x_agg_time_max)
plot(x_agg_time_min)
plot(x_agg_time_mean)

Not that all three plots are identical.

Thank you for your help on this!

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