

   nlevels {base}                               R Documentation

   TThhee NNuummbbeerr ooff LLeevveellss ooff aa FFaaccttoorr

   UUssaaggee::

        nlevels(x)

   DDeettaaiillss::

        If the argument is not a `factor', `NA' is returned.

        The actual factor levels (if they exist) can be
        obtained with the `levels' function.

   EExxaammpplleess::

        nlevels(gl(3,7)) # = 3

