Skip to contents

Compute the number of classes in a class_graph object.

Usage

# S3 method for class 'class_graph'
nclasses(x)

Arguments

x

A class_graph object.

Value

The number of classes in the class_graph.

Examples

labs <- factor(c("a","a","b"))
cg <- class_graph(labs)
nclasses(cg)
#> [1] 2