R/k_min_vals_vec.R

Defines functions k_min_vals_vec

#' @keywords internal
#' @noRd

# Identifies the values of the first (minimum) k values in a vector x
k_min_vals_vec <- function(x,k) {
  idx <- sort.int(x, index.return = T)$ix[1:k]
  x[idx]
}

Try the ARPALData package in your browser

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

ARPALData documentation built on Sept. 26, 2023, 5:07 p.m.