Skip to content

NA handling in st_interpolate_aw #830

@jsta

Description

@jsta

If some of the attributes of the "from" polygons in st_interpolate_aw are NA it seems there is no way to avoid them being propagated to the st_interpolate_aw output. Does it make sense to add an na.rm = TRUE argument?

nc = st_read(system.file("shape/nc.shp", package="sf"))
g = st_make_grid(nc, n = c(20,10))
a2 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE)

nc[sample(seq_len(nrow(nc)), 5), "BIR74"] <- NA
a3 = st_interpolate_aw(nc["BIR74"], g, extensive = TRUE)

plot(a2["BIR74"])
plot(nc["BIR74"])
plot(a3["BIR74"])

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