discrete1d: Measure for the degree of discreteness

Description Usage Arguments Value Author(s) See Also Examples

View source: R/oned.R

Description

A simple measure for the degree of discreteness of a variable, of the columns of a numeric matrix or of the variables of a data frame based on the number of unique values.

Usage

1

Arguments

x

A numeric vector, a numeric matrix or a data frame.

Value

A single value or a vector including the results of discrete1d for each variable (in case of numeric matrices or data frames). If variables from data frames are categorical, 'NA' is returned.

Author(s)

Katrin Grimm

See Also

multimod1d, skew1d, iaunivariate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(Election2005)

## Not run: 
discrete <- discrete1d(Election2005)
maxv <- order(discrete,decreasing=TRUE)[1:4]
par(mfrow=c(2,2))
for(i in 1:4){
  hist(Election2005[,maxv[i]], ,xlab="",breaks=30, 
  main=paste(names(Election2005[maxv[i]])))
}

# Explore skewness, multimodality and discreteness 
# within an interactive environment.
iaunivariate(Election2005)

## End(Not run)

mbgraphic documentation built on May 2, 2019, 2:45 a.m.