CoercionToStandard: Coercion from bit, bitwhich, which and ri to logical,...

Description Usage Arguments Value Author(s) See Also Examples

Description

Coercion from bit is quite fast because we use a double loop that fixes each word in a processor register.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## S3 method for class 'bit'
as.logical(x, ...)

## S3 method for class 'bit'
as.integer(x, ...)

## S3 method for class 'bit'
as.double(x, ...)

## S3 method for class 'bitwhich'
as.integer(x, ...)

## S3 method for class 'bitwhich'
as.double(x, ...)

## S3 method for class 'bitwhich'
as.logical(x, ...)

## S3 method for class 'ri'
as.logical(x, ...)

## S3 method for class 'ri'
as.integer(x, ...)

## S3 method for class 'ri'
as.double(x, ...)

## S3 method for class 'which'
as.logical(x, length = attr(x, "maxindex"), ...)

Arguments

x

an object of class bit, bitwhich or ri

...

ignored

length

length of the boolean vector (required for as.logical.which)

Value

as.logical returns a vector of FALSE, TRUE, as.integer and as.double return a vector of 0,1.

Author(s)

Jens Oehlschlägel

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17

bit documentation built on Aug. 4, 2020, 9:06 a.m.