Description Usage Arguments Details Value Author(s) See Also Examples
A bitwhich object like the result of which
and as.which
does represent integer subscript positions,
but bitwhich objects represent some subscripts rather with negative integers, if this needs less space.
The extreme cases of selecting all/none subscripts are represented by TRUE/FALSE.
This needs less RAM compared to logical
(and often less than as.which
).
Logical operations are fast if the selection is asymetric (only few or almost all selected).
1 |
maxindex |
the length of the vector (sum of all TRUEs and FALSEs) |
poslength |
Only use if x is not NULL: the sum of all TRUEs |
x |
Default NULL or FALSE or unique negative integers or unique positive integers or TRUE |
class 'bitwhich' represents a boolean selection in one of the following ways
FALSE to select nothing
TRUE to select everything
unique positive integers to select those
unique negative integers to exclude those
An object of class 'bitwhich' carrying two attributes
maxindex |
see above |
poslength |
see above |
Jens Oehlschlägel
1 2 |
Attaching package bit
package:bit (c) 2008-2012 Jens Oehlschlaegel (GPL-2)
creators: bit bitwhich
coercion: as.logical as.integer as.bit as.bitwhich which
operator: ! & | xor != ==
querying: print length any all min max range sum summary
bit access: length<- [ [<- [[ [[<-
for more help type ?bit
Attaching package: 'bit'
The following object is masked from 'package:base':
xor
bitwhich: 2/12
bitwhich: 10/12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.