findCols: extract classes from classInterval object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/classInt.R

Description

This helper function is a wrapper for findInterval to extract classes from a "classInterval" object

Usage

1
findCols(clI)

Arguments

clI

a "classIntervals" object

Value

an integer vector of class indices

Author(s)

Roger Bivand <Roger.Bivand@nhh.no>

See Also

classIntervals, findInterval

Examples

1
2
3
4
5
data(jenks71)
fix5 <- classIntervals(jenks71$jenks71, n=5, style="fixed",
 fixedBreaks=c(15.57, 25, 50, 75, 100, 155.30))
fix5
findCols(fix5)

Example output

style: fixed
  one of 3,921,225 possible partitions of this variable into 5 classes
 [15.57,25)     [25,50)     [50,75)    [75,100) [100,155.3] 
          6          34          42          14           6 
  [1] 3 4 4 3 4 4 4 4 5 5 5 5 4 4 3 4 4 4 4 5 3 4 3 3 4 3 3 3 3 5 3 3 3 3 3 3 3
 [38] 3 3 3 2 3 3 2 3 3 2 3 3 2 3 3 3 3 3 3 3 3 2 3 2 3 3 3 2 2 3 3 2 2 2 2 2 3
 [75] 2 2 2 2 3 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 1 2 1 1 1 2 2

classInt documentation built on May 31, 2017, 4:52 a.m.

Related to findCols in classInt...