ranges: Determine the ranges (max-min differences) of numeric columns...

Description Usage Arguments Details Value Author(s) Examples

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

Description

This function determines the ranges (max-min diffrences) of all numeric columns in a dataset. 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

Arguments

data

a dataframe or matrix

Details

For each numeric column the difference between its maximum and minimum values is calculated.

Value

A numeric vector of length equal to the number of columns of the input dataset and names the same as their names, containing the difference between the maximum and minimum value for numeric columns and NA for non-numeric columns.

Author(s)

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

Examples

1
2
3
4
5
6
ranges(matrix(1:12, ncol=4))
ranges(matrix(1:12, ncol=4, byrow=TRUE))
ranges(data.frame(a1=1:10, a2=2*(1:10)))

data(weatherr, package="dmr.data")
ranges(weatherr)

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