Skip to content

weighted_mean on raster with NAs  #78

@danielreispereira

Description

@danielreispereira

Trying to exact_extract() on a netcdf using a tiff as weights returns NaN for the majority of regions except for really small ones, suggesting that the function is failing if there are NAs on the input netcdf/Raster.
Simple mean/median working flawlessly.

Is this the expected behavior? Since there is no "na.rm=TRUE" or the likes when using weighted_mean, how can I proceed if either the data or weights raster contain missing pixels?

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