Answers for "access matrix row column r"

R
0

get matrix row name r

> 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"
Posted by: Guest on August-16-2020

Browse Popular Code Answers by Language