Skip to contents

Remove all dimension names from an array for compact printing.

Usage

empty.dimnames(a)

Arguments

a

an array, i.e., as special case a matrix.

Value

Returns a with its dimnames replaced by empty character strings.

Author

Bill Venables / Martin Maechler, Sept 1993.

See also

unname removes the dimnames.

Examples

empty.dimnames(diag(5)) # looks much nicer
#>           
#>  1 0 0 0 0
#>  0 1 0 0 0
#>  0 0 1 0 0
#>  0 0 0 1 0
#>  0 0 0 0 1

(a <- matrix(-9:10, 4,5))
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]   -9   -5   -1    3    7
#> [2,]   -8   -4    0    4    8
#> [3,]   -7   -3    1    5    9
#> [4,]   -6   -2    2    6   10
empty.dimnames(a) # nicer, right?
#>               
#>  -9 -5 -1 3  7
#>  -8 -4  0 4  8
#>  -7 -3  1 5  9
#>  -6 -2  2 6 10