interpola: Interpolate field using nearest neighbors

Description Usage Arguments Value Author(s) Examples

View source: R/interpola.R

Description

Interpolates a square input matrix to a finer resolution ns using nearest neighbours.

Usage

1

Arguments

z

matrix containing the input field at coarse resolution.

ns

the target size.

Value

The resulting fine-scale field with dimensions c(ns, ns).

Author(s)

Jost von Hardenberg, j.vonhardenberg@isac.cnr.it

Examples

1
2
3
4
5
za <- rnorm(4 * 4)
dim(za) <- c(4, 4)
z <- interpola(za, 16)
dim(z)
# [1] 16 16

rainfarmr documentation built on May 1, 2019, 8:02 p.m.