InterpolateMatrix {greenbrown}R Documentation

Interpolate NA values in a matrix using a moving mean

Description

This function interpolates missing values in a matrix with the mean of the neighbouring matrix cells.

Usage

InterpolateMatrix(m)

Arguments

m

a matrix with NA value to interpolate

Value

matrix with interpolated values

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

Examples

m <- matrix(1:25, 5, 10)
m[sample(1:50, 10)] <- NA
m
InterpolateMatrix(m)

[Package greenbrown version 2.4.3 Index]