R: Remove 'names' or 'dimnames' (original) (raw)
unname {base} | R Documentation |
---|
Description
Remove the [names](../../base/help/names.html)
or [dimnames](../../base/help/dimnames.html)
attribute of an R object.
Usage
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](../../base/help/names.html)
or[dimnames](../../base/help/dimnames.html)
.
Examples
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)
[Package _base_ version 4.6.0 Index]