Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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"
 
PREVIOUS NEXT
Tagged: #matrix #row
ADD COMMENT
Topic
Name
5+4 =