Test whether the current k is the best/optional k

# S4 method for ConsensusPartition
is_best_k(object, k, ...)

Arguments

object

A ConsensusPartition-class object.

k

Number of subgroups.

...

Pass to suggest_best_k,ConsensusPartition-method.

Details

Optional best k is also assigned as TRUE.

Value

Logical scalar.

Examples

data(golub_cola)
obj = golub_cola["ATC", "skmeans"]
is_best_k(obj, k = 2)
#> [1] TRUE
is_best_k(obj, k = 3)
#> [1] TRUE