ff (version 4.0.12)

length.hi: Hybrid Index, querying

Description

Functions to query some index attributes

Usage

# S3 method for hi
length(x)
# S3 method for hi
maxindex(x, ...)
# S3 method for hi
poslength(x, ...)

Value

an integer scalar

Arguments

x

an object of class hi

...

further arguments (not used)

Author

Jens Oehlschlägel

Details

length.hi returns the number of the subsript elements in the index (even if they are negative). By contrast poslength returns the number of selected elements (which for negative indices is maxindex(x) - length(unique(x))). maxindex returns the highest possible index position.

See Also

hi, as.hi, length.ff, length, poslength, maxindex

Examples

Run this code
  length(as.hi(-1, maxindex=12))
  poslength(as.hi(-1, maxindex=12))
  maxindex(as.hi(-1, maxindex=12))
  message("note that")
  length(as.hi(c(-1, -1), maxindex=12))
  length(as.hi(c(1,1), maxindex=12))

Run the code above in your browser using DataLab