inst/template/R/convolve2.R

#' Convolve Two Vectors
#'
#' This function demonstrates a Rust implementation of the convolution algorithm
#' shown in Section 5.10.1 "Calling .Call" of [*Writing R
#' Extensions*](https://cran.r-project.org/doc/manuals/R-exts.html#Calling-_002eCall).
#'
#' @param a A numeric vector.
#' @param b A numeric vector.
#'
#' @return A numeric vector.
#' @export
#' @examples
#' convolve2(c(1,2,3), c(2,4,8))
convolve2 <- function(a, b) {
  .Call(.convolve2, a, b)
}

Try the cargo package in your browser

Any scripts or data that you put into this service are public.

cargo documentation built on July 26, 2023, 5:20 p.m.