inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
76 stars 21 forks source link

Code/Doc mismatch in bru_fill_missing #116

Closed barryrowlingson closed 1 year ago

barryrowlingson commented 3 years ago

Documentation for bru_fill_missing says:

Usage:

     bru_fill_missing(
       data,

Arguments:
    data: A SpatialPointsDataFrame, SpatialPixelsDataFrame, or a
          SpatialGridDataFrame containg data to use for filling

but the first thing the code does is test for spatial pixels and spatial grid and that throws a stop on spatial points:

function (data, where, values, layer = NULL, selector = NULL, 
    batch_size = 500) 
{
    stopifnot(inherits(data, c("SpatialPixelsDataFrame", "SpatialGridDataFrame")))

Reported here: https://gis.stackexchange.com/questions/396050/trying-to-apply-inlabrubru-fill-missing-to-a-spatialpointsdataframe-to-fill-i/396052#396052

finnlindgren commented 3 years ago

Thanks for letting me know! Should now be fixed. The Grid support was also broken; I've added a conversion to Pixels to work around that as well.