Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.integer.hi

Hybrid Index, coercing from


Description

Functions that (back-)convert an hi object to the respective subscripting information.

Usage

## S3 method for class 'hi'
as.which(x, ...)
## S3 method for class 'hi'
as.bitwhich(x, ...)
## S3 method for class 'hi'
as.bit(x, ...)
## S3 method for class 'hi'
as.integer(x, vw.convert = TRUE, ...)
## S3 method for class 'hi'
as.logical(x, maxindex = NULL, ...)
## S3 method for class 'hi'
as.character(x, names, vw.convert = TRUE, ...)
## S3 method for class 'hi'
as.matrix(x, dim = x$dim, dimorder = x$dimorder
, vw = x$vw, symmetric = x$symmetric, fixdiag = x$fixdiag, ...)

Arguments

x

an object of class hi

maxindex

the length of the subscripted object (needed for logical output)

names

the names vector of the subscripted object

dim

the dim of the subscripted object

dimorder

the dimorder of the subscripted object

vw

the virtual window vw of the subscripted object

vw.convert

vw.convert

symmetric

TRUE if the subscripted matrix is symmetric

fixdiag

TRUE if the subscripted matrix has fixdiag

...

further arguments passed

Value

as.integer.hi returns an integer vector, see as.hi.integer. as.logical.hi returns an logical vector, see as.hi.logical. as.character.hi returns a character vector, see as.hi.character. as.matrix.hi returns a matrix index, see as.hi.matrix.

Author(s)

Jens Oehlschlägel

See Also

Examples

x <- 1:6
  names(x) <- letters[1:6]
  as.integer(as.hi(c(1:3)))
  as.logical(as.hi(c(TRUE,TRUE,TRUE,FALSE,FALSE,FALSE)))
  as.character(as.hi(letters[1:3], names=names(x)), names=names(x))
  x <- matrix(1:12, 6)
  as.matrix(as.hi(rbind(c(1,1), c(1,2), c(2,1)), dim=dim(x)), dim=dim(x))

ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.