powered by
Coercing to something like the result of which which
which
# S3 method for which as.which(x, maxindex = NA_integer_, ...)# S3 method for `NULL` as.which(x, ...)# S3 method for numeric as.which(x, maxindex = NA_integer_, ...)# S3 method for integer as.which(x, maxindex = NA_integer_, is.unsorted = TRUE, has.dup = TRUE, ...)# S3 method for logical as.which(x, ...)# S3 method for ri as.which(x, ...)# S3 method for bit as.which(x, range = NULL, ...)# S3 method for bitwhich as.which(x, ...)as.which(x, ...)
# S3 method for `NULL` as.which(x, ...)
# S3 method for numeric as.which(x, maxindex = NA_integer_, ...)
# S3 method for integer as.which(x, maxindex = NA_integer_, is.unsorted = TRUE, has.dup = TRUE, ...)
# S3 method for logical as.which(x, ...)
# S3 method for ri as.which(x, ...)
# S3 method for bit as.which(x, range = NULL, ...)
# S3 method for bitwhich as.which(x, ...)
as.which(x, ...)
a vector of class 'logical' or 'integer'
an object of classes bit, bitwhich, ri or something on which which works
bit
bitwhich
ri
the length of the boolean vector which is represented
further arguments (passed to which for the default method, ignored otherwise)
a logical scalar indicating whether the data may be unsorted
a logical scalar indicating whether the data may have duplicates
a ri or an integer vector of length==2 giving a range restriction for chunked processing
as.which(which): method to coerce to which from which
as.which(which)
as.which(`NULL`): method to coerce to zero length which from NULL
as.which(`NULL`)
NULL
as.which(numeric): method to coerce to which from numeric
as.which(numeric)
numeric
as.which(integer): method to coerce to which from integer
as.which(integer)
integer
as.which(logical): method to coerce to which from logical
as.which(logical)
logical
as.which(ri): method to coerce to which from ri
as.which(ri)
as.which(bit): method to coerce to which from bit
as.which(bit)
as.which(bitwhich): method to coerce to which from bitwhich
as.which(bitwhich)
Jens Oehlschlägel
as.which.bit returns a vector of subscripts with class 'which'
as.which.bit
CoercionToStandard, as.booltype, as.bit, as.bitwhich , as.which, as.ri, as.hi, as.ff
CoercionToStandard
as.booltype
as.bit
as.bitwhich
as.which
as.ri
as.hi
as.ff
r <- ri(5, 20, 100) x <- as.which(r) x stopifnot(identical(x, as.which(as.logical(r)))) stopifnot(identical(x, as.which(as.bitwhich(r)))) stopifnot(identical(x, as.which(as.bit(r))))
Run the code above in your browser using DataLab