get.f.step.size: Get step size for data

View source: R/helpers.r

get.f.step.sizeR Documentation

Get step size for data

Description

Get step size for data.

Usage

get.f.step.size(d, f)

Arguments

d

The data to have the step size determined

f

The function to aggregate the step size

Details

Gets the step size for data, aggregated by the supplied function. This is useful when you want to know the mean timestep size, median, minimum, range, etc for the purposes of classifying data by time resolution.

Value

The step size

Examples

dat <- c(1, 2, 3, 4, 5, 7)
## Will be 2
max.step.size <- get.f.step.size(dat, max)
## Will be 1
min.step.size <- get.f.step.size(dat, min)


ncdf4.helpers documentation built on April 12, 2025, 1:39 a.m.