R/RcppExports.R

Defines functions emptyRcpp array_w_mean

Documented in array_w_mean

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

#' Index based weighted means from arrays in C++
#'
#' This function takes an array and a summary scheme and returns a vector of weighted means per group.
#' 
#' A summary scheme must contain 3 columns of array indices on rows, columns and slices, titled "x", "y", 
#' and "layer". A column named "group" defines the values to be summarised together. A column "weight" 
#' contains the weights for computing weighted mean. Helper functions are coming to help make common schemes.   
#'
#' @param array to be summarised.
#' @param scheme a dataframe containing the indices to average together with weights.
#' @return A vector containing summary values per group, ordered by group.
#' @export
array_w_mean <- function(array, scheme) {
    .Call('_nemomedusR_array_w_mean', PACKAGE = 'nemomedusR', array, scheme)
}

emptyRcpp <- function(a) {
    .Call('_nemomedusR_emptyRcpp', PACKAGE = 'nemomedusR', a)
}
Jack-H-Laverick/nemomedusR documentation built on Dec. 12, 2022, 5:21 a.m.