📜  获取矩阵行名称 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:51:58.313000             🧑  作者: Mango

代码示例1
> grades_matrix
             Math      Science          Art
Student_1      90           88           75
Student_2      78           81           95 
Student_3      84           85           83

> rownames(grade_matrix)[2]
[1] "Student_2"

> colnames(grade_matrix)[3]
[1] "Art"