Check which points have potentially invalid depths.
check_depth(data, report = FALSE, depthmargin = 0, shoremargin = NA, bathymetry = NULL)
data | The data frame. |
---|---|
report | If TRUE, errors are returned instead of records. |
depthmargin | How much can the given depth deviate from the bathymetry in the rasters (in meters). |
shoremargin | How far offshore (in meters) should a record be to have a
bathymetry greater than 0. If |
bathymetry | Raster* object that you want to use to check the depth
against. If |
Problematic records or an errors report.
Multiple checks are performed in this function:
missing depth column (warning)
empty depth column (warning)
depth values that can't be converted to numbers (error)
depth values
that are larger than the depth value in the bathymetry layer, after
applying the provided depthmargin
(error)
depth values that
are negative for off shore points, after applying the provided
shoremargin
(error)
minimum depth greater than maximum depth (error)
check_onland
check_outliers_dataset
check_outliers_species
lookup_xy
# NOT RUN { notok <- check_depth(abra, report = FALSE) print(nrow(notok)) r <- check_depth(abra, report = TRUE, depthmargin = 100, shoremargin = 100) print(r) plot_map_leaflet(abra[r$row,], popup = "id") # }