bit (version 4.0.5)

as.bitwhich.NULL: Coercing to bitwhich

Description

Functions to coerce to bitwhich

Usage

# S3 method for `NULL`
as.bitwhich(x, ...)

# S3 method for bitwhich as.bitwhich(x, ...)

# S3 method for which as.bitwhich(x, maxindex = attr(x, "maxindex"), ...)

# S3 method for ri as.bitwhich(x, ...)

# S3 method for integer as.bitwhich(x, poslength = NULL, ...)

# S3 method for double as.bitwhich(x, poslength = NULL, ...)

# S3 method for logical as.bitwhich(x, poslength = NULL, ...)

# S3 method for bit as.bitwhich(x, range = NULL, poslength = NULL, ...)

as.bitwhich(x = NULL, ...)

Value

a value of class bitwhich

Arguments

x

An object of class 'bitwhich', 'integer', 'logical' or 'bit' or an integer vector as resulting from 'which'

...

further arguments

maxindex

the length of the new bitwhich vector

poslength

the number of selected elements

range

a ri or an integer vector of length==2 giving a range restriction for chunked processing

Methods (by class)

  • NULL: method to coerce to bitwhich (zero length) from NULL

  • bitwhich: method to coerce to bitwhich from bitwhich

  • which: method to coerce to bitwhich from which

  • ri: method to coerce to bitwhich from ri

  • integer: method to coerce to bitwhich from integer (0 and NA become FALSE, everthing else becomes TRUE)

  • double: method to coerce to bitwhich from double (0 and NA become FALSE, everthing else becomes TRUE)

  • logical: method to coerce to bitwhich from logical

  • bit: method to coerce to bitwhich from bit

Author

Jens Oehlschlägel

See Also

CoercionToStandard, as.booltype, as.bit, as.bitwhich , as.which, as.ri, as.hi, as.ff

Examples

Run this code
as.bitwhich(c(0L,1L,2L,-2L,NA))
as.bitwhich(c(0,1,2,-2,NA))

 as.bitwhich(c(NA,NA,NA))
 as.bitwhich(c(FALSE, FALSE, FALSE))
 as.bitwhich(c(FALSE, FALSE, TRUE))
 as.bitwhich(c(FALSE, TRUE, TRUE))
 as.bitwhich(c(TRUE, TRUE, TRUE))

Run the code above in your browser using DataLab