Currently, this only tests for validity of a SpatVect file, then if there is a problem, it will run terra::makeValid

fixErrorsIn(
  x,
  error = NULL,
  verbose = getOption("reproducible.verbose"),
  fromFnName = ""
)

Arguments

x

The SpatStat or SpatVect object to try to fix.

error

The error message, e.g., coming from try(...)

verbose

Numeric, -1 silent (where possible), 0 being very quiet, 1 showing more messaging, 2 being more messaging, etc. Default is 1. Above 3 will output much more information about the internals of Caching, which may help diagnose Caching challenges. Can set globally with an option, e.g., options('reproducible.verbose' = 0) to reduce to minimal

fromFnName

The function name that produced the error, e.g., maskTo

Value

An object of the same class as x, but with some errors fixed via terra::makeValid()