Description Usage Arguments Details Value Methods (by class) Note Author(s) See Also Examples
Coercing to bit vector
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  ## S3 method for class ''NULL''
as.bit(x, ...)
## S3 method for class 'bit'
as.bit(x, ...)
## S3 method for class 'logical'
as.bit(x, ...)
## S3 method for class 'integer'
as.bit(x, ...)
## S3 method for class 'double'
as.bit(x, ...)
## S3 method for class 'bitwhich'
as.bit(x, ...)
## S3 method for class 'which'
as.bit(x, length = attr(x, "maxindex"), ...)
## S3 method for class 'ri'
as.bit(x, ...)
as.bit(x = NULL, ...)

x 
an object of class 
... 
further arguments 
length 
the length of the new bit vector 
Coercing to bit is quite fast because we use a double loop that fixes each word in a processor register
is.bit
returns FALSE or TRUE, as.bit
returns a vector
of class 'bit'
NULL
: method to coerce to bit
(zero length) from NULL
bit
: method to coerce to bit
from bit
logical
: method to coerce to bit
from logical
integer
: method to coerce to bit
from
integer
(0L
and NA
become FALSE
,
everthing else becomes TRUE
)
double
: method to coerce to bit
from
double
(0
and NA
become FALSE
, everthing
else becomes TRUE
)
bitwhich
: method to coerce to bit
from bitwhich
which
: method to coerce to bit
from which
ri
: method to coerce to bit
from ri
Zero is coerced to FALSE, all other numbers including NA are coerced to TRUE. This differs from the NAtoFALSE coercion in package ff and may change in the future.
Jens OehlschlĂ¤gel
CoercionToStandard
, as.booltype
, as.bit
, as.bitwhich
, as.which
, as.ri
, as.hi
, as.ff
1 2 3 4 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.