Return the number of levels which its argument has.
- an object, usually a factor.
This is usually applied to a factor, but other objects can have levels. The actual factor levels (if they exist) can be obtained with the
The length of
levels(x), which is zero if
x has no levels.
Documentation reproduced from R 2.15.3. License: GPL-2.