attr.type: Get a discrete/numeric attribute type information for a...

Description Usage Arguments Details Value Author(s) Examples

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

Description

This function determines whether particular dataset columns represent discrete or continuous attributes. 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

...

one or more vectors or dataframes

Details

The type of each input vector or each column of each input dataframe is checked using is.numeric and considered a continuous attribute if it returns TRUE or a discrete attribute otherwise.

Value

A character string of length equal to the total number of input vectors, consisting of "c" (for continuous) or "d" (for discrete) characters, representing the types of the respective attributes.

Author(s)

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

Examples

1
2
3
data(weatherr, package="dmr.data")
attr.type(weatherr$outlook, weatherr$playability)
attr.type(weatherr)

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