, , RE
Midterm Final mean
A 81.9 75.1 78.5
B 78.3 69.2 73.8
C 79.6 74.4 77.0
mean 79.9 72.9 76.4
I'm trying to name the rows and columns so that "Subject" is above the rows "A,B,C, and mean", and "Exam" is above the columns. I'd also like the header to be "Initial = RE" instead of just "RE".
To construct an array with named
dimnames, pass a named list as thedimnamesargument ofmatrixorarray:To modify an existing array so that it has named
dimnames, set thenamesattribute of thedimnamesattribute:However, note that
names(dimnames(y)) <- valuewill not work ifdimnames(y)isNULL:To get named but "empty"
dimnamesin the above case, you would have to do something likeor equivalently
Now:
It is interesting that we don't see
D3 = 1andD3 = 2in theprintoutput. That might be a bug - I'd have to ask the people upstairs.