#' Name-preserving interpolation
#'
#' Wrapper for stats::approx() that takes and returns a data frame, preserving
#' its column names
#'
#' @noRd
#' @keywords internal
approx_df <- function(x, xout, ...) {
y <- stats::approx(x, xout = xout, ...)
y <- data.frame(y)
colnames(y) <- colnames(x)
y
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.