R: Remove `names' or `dimnames'

unname {base} | R Documentation

## Remove `names' or `dimnames'

### Description

Remove the `names` or `dimnames` attribute of an R object.

### Usage

    unname(obj, force = FALSE)

### Arguments

`obj` | the R object which is wanted ``nameless''.
`force` | logical; if true, the `dimnames` are even removed from `data.frame`s. This argument is currently experimental and hence might change!

### Value

Object as `obj` but without `names` or `dimnames`.

### Examples

    ## Answering a question on R-help (14 Oct 1999):
    col3 <- 750+ 100* rt(1500, df = 3)
    breaks <- factor(cut(col3,breaks=360+5*(0:155)))
    str(table(breaks)) # The names are quite larger than the data ...
    barplot(unname(table(breaks)), axes= FALSE)

[Package Contents]