predictor.nn.indices: Calculate spatial index position of nearest neighbors

View source: R/prepareData.R

predictor.nn.indicesR Documentation

Calculate spatial index position of nearest neighbors

Description

Calculate spatial index position of nearest neighbors

Usage

predictor.nn.indices(vars = NULL, n = NULL, x, y)

Arguments

vars

Character vector of the names of the variable(s) to be used as local predictors

n

Integer vector. Number of nearest neighbours to be considered for each variables in vars. Its length must be either 1 –in case there is one single local predictor variable or the same number of neighbours is desired for every local predictor variable– or equal the length of vars, to consider a varying number of neighbours for each local predictor variable.

x.grid

The (multi)grid containing the predictors

y.grid

The grid containing the predictand

Value

A list of matrices (rows = local neighbors, cols = predictand points). The list is of the same length as the number of local predictor variables chosen

Author(s)

J Bedia

See Also

Other downscaling.helpers: predictor.nn.values(), prepareData(), prepareNewData()


SantanderMetGroup/downscaleR documentation built on Nov. 16, 2024, 1:35 a.m.