Number of Levels of a Factor

DESCRIPTION:

Return the number of levels that an object has.

USAGE:

nlevels(x)

REQUIRED ARGUMENTS:

x
an object, typically a factor, having a levels attribute.

VALUE:

an integer value giving the number of levels. Returns 0 if no levels exist.

DETAILS:

This function was added for compatibility with R.

SEE ALSO:

, .

EXAMPLES:

nlevels(fuel.frame$Type)