trying to fix raster vs base::subset issue