You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In terra to get quantiles across cells for a layer you can use terra::global(x, fun=quantile). In raster this was done using raster::quantile. For large rasters this can take a long time or fail since I believe determining quantiles requires reading all values into memory. raster::quantile had an ncells argument to allow for a random sample of a specified size to be used instead. Perhaps this could be added if quantile is used as the function, or perhaps even better as an argument to global more generally.
The text was updated successfully, but these errors were encountered:
In
terra
to get quantiles across cells for a layer you can useterra::global(x, fun=quantile)
. Inraster
this was done usingraster::quantile
. For large rasters this can take a long time or fail since I believe determining quantiles requires reading all values into memory.raster::quantile
had anncells
argument to allow for a random sample of a specified size to be used instead. Perhaps this could be added ifquantile
is used as the function, or perhaps even better as an argument toglobal
more generally.The text was updated successfully, but these errors were encountered: