R/ksmoothVec.R

Defines functions ksmoothVec

Documented in ksmoothVec

#' ksmoothVec
#'
#' @param x
#' @param bw
#'
#' @return
#' @export
#'
#' @examples
ksmoothVec <- function(x, bw = 50){
    y = x
    x = zoo::index(x)
    krnl = ksmooth(x, y, kernel = "box", bandwidth = bw)
    all.equal(krnl$x, x)
    return(krnl)
}
NRSC/nphys documentation built on Nov. 13, 2024, 2:12 a.m.