unname: Remove 'names' or 'dimnames'

Description Usage Arguments Value Examples

Description

Remove the names or dimnames attribute of an R object.

Usage

1
unname(obj, force = FALSE)

Arguments

obj

an R object.

force

logical; if true, the dimnames (names and row names) are removed even from data.frames.

Value

Object as obj but without names or dimnames.

Examples

1
2
3
4
5
6
7
8
require(graphics); require(stats)

## 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)))
z <- table(breaks)
z[1:5] # The names are larger than the data ...
barplot(unname(z), axes = FALSE)

robertzk/monadicbase documentation built on May 27, 2019, 10:35 a.m.