log_linear_interp | R Documentation |
Log-linear interpolation of NA values
log_linear_interp(y, x, rule = 2, replace_na = 0)
y |
vector of output values, possibly with NAs |
x |
vector of points to interpolate (no NAs) |
rule |
rule for extrapolating outside range (see |
replace_na |
value to replace if interpolation evaluates to NA |
log_linear_interp(c(100, 105, NA, 110), 1:4)
log_linear_interp(c(NA, 105, NA, 110), 1:4)
log_linear_interp(c(NA, 105, NA, 110, NA), 1:5, rule = 1)
log_linear_interp(c(NA, 105, NA, 110, NA), 1:5, rule = 2)
log_linear_interp(c(NA, NA, 37), 1:3, rule = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.