R/RcppExports.R

Defines functions cluster_interval sort_indices

Documented in cluster_interval

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

sort_indices <- function(x) {
    .Call(`_tidygenomics_sort_indices`, x)
}

#' Cluster ranges which are implemented as 2 equal-length numeric vectors.
#' @param starts A numeric vector that defines the starts of each interval
#' @param ends A numeric vector that defines the ends of each interval
#' @param max_distance The maximum distance up to which intervals are still considered to be
#'  the same cluster. Default: 0.
#' @examples
#' starts <- c(50, 100, 120)
#' ends <- c(75, 130, 150)
#' j <- cluster_interval(starts, ends)
#' j == c(0,1,1)
#' @export
cluster_interval <- function(starts, ends, max_distance = 0L) {
    .Call(`_tidygenomics_cluster_interval`, starts, ends, max_distance)
}
Artjom-Metro/tidygenomics documentation built on April 16, 2021, 1:47 p.m.