binning1d: Binning numeric values

Description Usage Arguments Details Value Author(s) Examples

View source: R/spheroid.R

Description

Vector of count data

Usage

1
binning1d(x, bin, na.rm = FALSE)

Arguments

x

numeric values to be binned

bin

non-decreasingly sorted breaks vector

na.rm

logical, default FALSE, whether to remove missing values, including NaN in x

Details

The function provides basic binning (grouping) of numeric values into classes defined by the breaks vector bin. The values are binned according to bin[i[j]]<x[j]≤q bin[i[j]+1] for intervals i=1,...,N-1 and length(bin)=N of values x[j], j=1,...,|x|. If x[j] > bin[N] or x[j] < bin[1] then x[j] is not counted at all.

Value

Vector of count data

Author(s)

M. Baaske

Examples

1
2
3
	x <- runif(100,0,1)
	bin <- seq(0,1,by=0.1)
	binning1d(x,bin)

unfoldr documentation built on Sept. 25, 2021, 3:01 a.m.