, , 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 thedimnames
argument ofmatrix
orarray
:To modify an existing array so that it has named
dimnames
, set thenames
attribute of thedimnames
attribute:However, note that
names(dimnames(y)) <- value
will not work ifdimnames(y)
isNULL
:To get named but "empty"
dimnames
in the above case, you would have to do something likeor equivalently
Now:
It is interesting that we don't see
D3 = 1
andD3 = 2
in theprint
output. That might be a bug - I'd have to ask the people upstairs.