lookup function

Lookup table

Lookup table

Interpolate values from a lookup table

lookup(table, t)

Arguments

  • table: a covartable object created by a call to covariate_table
  • t: numeric vector; times at which interpolated values of the covariates in table are required.

Returns

A numeric vector or matrix of the interpolated values.

Extrapolation

If t is outside the range of the lookup table, the values will be extrapolated, and a warning will be issued. The type of extrapolation performed will be constant or linear according to the order flag used when creating the table.

See Also

More on interpolation: bsplines, covariates

  • Maintainer: Aaron A. King
  • License: GPL-3
  • Last published: 2025-04-16