midbrk: Find middle break points between consecutive values in a...

Description Usage Arguments Details Value Author(s) Examples

View source: R/r-utility-midbrk.R

Description

This function finds break points in the middle between consecutive values contained in a numeric vector. It is used in examples presented in the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/data_mining_algorithms for more details.

Usage

1
midbrk(v)

Arguments

v

a numeric vector

Details

Breaks are identified as the middle points between every two consecutive elements of v after sorting.

Value

A vector of middle break points for v.

Author(s)

Pawel Cichosz <p.cichosz@elka.pw.edu.pl>

Examples

1
2
3
4
5
midbrk(1:10)
midbrk(2*(1:10))

data(weatherr, package="dmr.data")
midbrk(sort(unique(weatherr$temperature)))

42n4/dmr.util documentation built on May 20, 2019, 2:02 p.m.