This intrapolation algorithm replaces internal missing values in a matrix. It does so in the following steps:
Calculate separate intrapolations in four directions: rows, columns, NWSE diagonals (upper left down to lower right), and SWNE diagonals (lower left up to upper right). The intrapolations in each direction is based on the algorithm of
intrapolate_1D()
. (See details there.)The 2D intrapolation is the mean intrapolation from any of the four values. In taking the mean, missing intrapolations are removed.
When there is no intrapolation available from any of the four directions, the missing value remains missing.
Value
If consolidate = TRUE
(default), returns a numeric matrix of the same dimensions as the input mx
with internal missing values linearly intrapolated. If consolidate = FALSE
, returns a list of intrapolations for missing values from each of the four directions (rows, columns, NWSE diagonal, and SWNE diagonal).