View source: R/helper_functions.R
| csm_get_at_t | R Documentation |
Linearly interpolate a time-varying variable at specific time point
csm_get_at_t(
x,
t_ind,
t,
method = "linear",
search = c("interpolation", "bisection", "bruteforce", "i=t+1")
)
x |
a vector of a time-varying values for which to interpolate |
t_ind |
a vector of times corresponding to the values in x |
t |
a single time point at which to return a value |
method |
a string indicating what method to use for interpolation. One of: "linear" |
search |
a string indicating what method to use for finding the correct indices within t_ind. One of: "bisection", "interpolation" |
the numeric value of the time-varying variable interpolated at time t
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.