R/RcppExports.R

Defines functions median_freq

Documented in median_freq

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

#' Finds the median
#'
#' Returns the median of a list of values with corresponding frequencies. This
#'  is not intended to be called directly by the user.
#'
#' @param values A vector of the unique values that occur
#' @param freqs A vector of the number of occurrences of each value
#' @return Returns the median value of the data comprising each entry in values
#'  repeated the corresponding entry in freqs number of times, as a numeric.
#' @author Tom Mayo \email{t.mayo@@ed.ac.uk}
#' @examples
#' median_freq(c(1,2,3), c(3,6,10))
#' @export
median_freq <- function(values, freqs) {
    .Call('M3D_median_freq', PACKAGE = 'M3D', values, freqs)
}

Try the M3D package in your browser

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

M3D documentation built on April 29, 2020, 5:59 a.m.