grid_filter() you may filter occurrence records inside grid cells in order to keep only the record with the highest confidence level in each grid cell.
As example, we will filter the
occ.class in square grid cells of 0.5 decimal degree of side, which is the default grid cell size of
grid_filter(). You can provide the height and width of the grid cell in
grid.resolution argument, or provide a raster layer in argument
r from which the cell is used to filter occurrences.
# Load package and data library(naturaList) data("A.setosa") data("speciaLists") # classification <- classify_occ(A.setosa, speciaLists) occ.class # grid filtering <- grid_filter(occ.class) occ.grid dim(occ.grid) table(occ.grid$naturaList_levels)