R/version.R

Defines functions getAnnoyVersion

Documented in getAnnoyVersion

#' Get the Annoy library version
#'
#' Get the version of the Annoy C++ library that RcppAnnoy was compiled with.
#'
#' @param compact Logical scalar indicating whether a compact
#'   \code{\link{package_version}} should be returned.
#'
#' @return An integer vector containing the major, minor and patch version numbers;
#' or if \code{compact=TRUE}, a \code{\link{package_version}} object.
#'
#' @author Aaron Lun
getAnnoyVersion <- function(compact=FALSE) {
    v <- .annoy_version()
    if (compact) as.package_version(paste(unname(v), collapse = "."))
    else v
}

Try the RcppAnnoy package in your browser

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

RcppAnnoy documentation built on July 9, 2023, 7:30 p.m.