# NOT RUN {
library(partitionComparison)
randIndex(new("Partition", c(0, 0, 0, 1, 1)), new("Partition", c(0, 0, 1, 1, 1)))
# [1] 0.6
# }
# NOT RUN {
randIndex(c(0, 0, 0, 1, 1), c(0, 0, 1, 1, 1))
# }
# NOT RUN {
# Error in (function (classes, fdef, mtable) :
# unable to find an inherited method for function 'randIndex' for signature '"numeric", "numeric"'
registerPartitionVectorSignatures(environment())
randIndex(c(0, 0, 0, 1, 1), c(0, 0, 1, 1, 1))
# [1] 0.6
# }
Run the code above in your browser using DataLab