| nlevels | R Documentation |
Return the number of levels which its argument has.
nlevels(x)
x |
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 levels function.
The length of levels(x), which is zero if
x has no levels.
levels, factor.
nlevels(gl(3, 7)) # = 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.