disindex-class | R Documentation |
"disindex"
Experimental disindex
class provides a disordR
-compliant
method for indexing disord
objects. The idea is that
which(x)
, where x
is Boolean of class disord
,
should have meaning under disordR
discipline. Thus
which()
gives a disindex
object. This object can be
used as an index for other disord
objects. One application
would be the dismat
class of matrices, currently under
development.
Function values()
coerces its argument to an integer vector.
Objects can be created by calls of the form new("disindex", ...)
,
although which()
is more natural.
value
:Numeric vector
hash
:Object of class character
that
specifies the hash code
Robin K. S. Hankin
(x <- disord(c(1,2,1,2,2,7)))
x==2
w <- which(x==2)
w
x[w] <- 100
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.