check_depth | R Documentation |
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 |
SpatRaster ([terra] package) object that you want to use to check the depth
against. If |
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)
Problematic records or an errors report.
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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.