

   names {base}                                 R Documentation

   TThhee NNaammeess AAttttrriibbuuttee ooff aann OObbjjeecctt

   DDeessccrriippttiioonn::

        `names' is a generic accessor function to the `names'
        attribute of an R object, typically a `vector'.  The
        first form prints the names of the observations and the
        second sets the names.  In this case, `value' must be a
        vector of character strings of the same length as `x'.

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

        names(x, ...)
        names.default(x)
        names(x) <- value

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

        # print the names attribute of the islands data set
        names(islands)

        # remove the names attribute
        names(islands) <- NULL

