Skip to contents

Advanced processes of data cleaning involving duplicate removal and movement of records.

Usage

advanced_cleaning(data, x, y, raster_layer, cell_duplicates = TRUE,
                  move_points_inside = FALSE, move_limit_distance = NULL,
                  verbose = TRUE)

remove_cell_duplicates(data, x, y,
                       raster_layer)

move_2closest_cell(data, x, y, raster_layer,
                   move_limit_distance, verbose = TRUE)

Arguments

data

data.frame with occurrence records. Rows with NA values will be omitted.

x

(character) name of the column in data containing longitude values.

y

(character) name of the column in data containing latitude values.

raster_layer

a raster layer (object of class SpatRaster).

cell_duplicates

(logical) whether to remove duplicate coordinates considering raster cells. Default = TRUE.

move_points_inside

(logical) whether to move records outside of raster cells with valid values to the closest cell with values. Default = FALSE.

move_limit_distance

maximum distance to move records outside cells with valid values. Default = NULL. Must be defined if move_points_inside = TRUE.

verbose

(logical) whether to print messages of progress. Default = TRUE.

Value

A data.frame with occurrence records resulting from advanced cleaning procedures. Other columns will be added to describe changes made in the original data.

Details

Data used in this functions should have gone through initial processes of cleaning and filtering.