Search notes:

R function: rownames


m <- matrix(1:30, nrow=10)

rownames(m) <- LETTERS[1:10]
colnames(m) <- c('foo', 'bar', 'baz')

m
#   foo bar baz
# A   1  11  21
# B   2  12  22
# C   3  13  23
# D   4  14  24
# E   5  15  25
# F   6  16  26
# G   7  17  27
# H   8  18  28
# I   9  19  29
# J  10  20  30
Github repository about-r, path: /functions/rownames.R

See also

Index to (some) R functions

Index