Learn R Programming

intamap (version 1.3-21)

checkSetup: check setup

Description

checkSetup will do some sanity checks on input data provided through object.

Usage

checkSetup(object, quiet = FALSE)

Arguments

object
object, to be passed to preProcess, see intamap-package
quiet
logical; TRUE to suppress OK statement

Value

  • returns TRUE if check passes, will halt with error when some some error condition is met.

Details

checkSetup is a function that makes certain tests on the intamap object to make sure that it is suited for interpolation. Particularly, it will issue a warning or an error if one of the following conditions are met:
  • observationsis not an element ofobject
  • observationscontain less than 20 observations
  • Some of the observation locations are duplicated
  • formulaStringis not an element ofobject
  • None of the columns ofobservationshas a name that corresponds to the independent variable offormulaString
  • predictionLocationsis not an element ofobject
  • predictionLocationsis not aSpatialobject
  • targetCRSis given, butobservationsandpredictionLocationsdo not have CRS set
  • addBiasincludes biases that are not part ofremoveBias
The function will issue a warning if it appears that predictionLocations and observations share a small region. This warning is given as it is a likely cause of errors, although it can also happen if predictionLocations are limited to one small cluster.

References

http://www.intamap.org/