Learn R Programming

mets (version 0.2.8)

fast.approx: Fast approximation

Description

Fast approximation

Usage

fast.approx(time, new.time, equal = FALSE, ...)

Arguments

time
Original ordered time points
new.time
New time points
equal
If TRUE a list is returned with additional element
...
Optional additional arguments

Examples

Run this code
id <- c(1,1,2,2,7,7,10,10)
fast.approx(unique(id),id)

t <- 0:6
n <- c(-1,0,0.1,0.9,1,1.1,1.2,6,6.5)
fast.approx(t,n,equal=TRUE)

Run the code above in your browser using DataLab