get_patches is what makes stats_by_group very slow, but this is made slow in turn by other functions in other packages (e.g. calculating local G statistics using spdep), and by converting between classes (e.g. dataframe -> matrix -> raster -> polygons). Review ways to make some of these steps faster, or optional.
get_patches
is what makesstats_by_group
very slow, but this is made slow in turn by other functions in other packages (e.g. calculating local G statistics usingspdep
), and by converting between classes (e.g. dataframe -> matrix -> raster -> polygons). Review ways to make some of these steps faster, or optional.