interpolate_values: Interpolate Values

Description Usage Arguments Value Author(s) Examples

View source: R/interpolate_values.R

Description

Obtain the values of a variable of interest corresponding to a continuous variable (t_out) using

Usage

1
interpolate_values(t_out, t_in, values_in, direction = "down")

Arguments

t_out

A numeric vector of size n.

t_in

A numeric vector of size m.

values_in

A character or numeric vector of size m.

direction

A string equal to "down" or "up".

Value

A vector of size n.

Author(s)

Guillermo Basulto Elias

Examples

1
2
3
4
 x <- c(1, 2, 4, 5)
 y <- c(1, 3, 7)
 z <- c("a", "b", "a")
 interpolate_values(x, y, z)

gbasulto/rmiscfun documentation built on July 25, 2019, 8:56 p.m.