sample_stat: Calculate statistics on samples

View source: R/sample_stat.R

sample_statR Documentation

Calculate statistics on samples

Description

This function will apply a statistical function to each sample.

Usage

sample_stat(sample, fun, single = FALSE, ...)

Arguments

sample

An object returned by the function cube_sample.

fun

A function returning descriptive statistics. See Details.

single

Logical. Should samples be combined in a single sample before statistics?

...

Additional arguments passed to fun.

Details

The statistical function should return a single value. Examples as mean, var, sd, min, max.

Value

A matrix with the statistcs per sample and band (wavelenth).


AlexCast/surfspec documentation built on July 7, 2022, 9:35 a.m.