approxfun2: 2D Interpolation Function Constructor

View source: R/score_calculator.R

approxfun2R Documentation

2D Interpolation Function Constructor

Description

Creates a closure that performs 2D interpolation over a grid using pracma::interp2.

Usage

approxfun2(x, y, Z, method = "linear")

Arguments

x

Numeric vector. Grid values along the x-axis.

y

Numeric vector. Grid values along the y-axis.

Z

Matrix. Grid values corresponding to (x, y).

method

Character. Interpolation method; default is "linear".

Value

A function that takes 'x' and 'y' (e.g. for age and height) vectors and returns interpolated values for 'z'.


pediatric.zcalc documentation built on Sept. 30, 2026, 5:13 p.m.