[R] Adding summary title to table

David Arnold
Mon, 03 Sep 2012 22:25:28 -0000

All,

I have:

x <- matrix(c(22,3,6,69,9,4,7,81,23,4,22,50),nrow=3,byrow=TRUE)
rownames(x) <- c("Cold or
flu","Headache","Backache");
colnames(x) <- c("Went to doctor","No response","Did
nothing","Self-medicated")
x <- t(x)
print(x)

1. I'd like to add the title "Nutritional Status" above the column
names
when displayed with print(x).

2. I'd like to add the title "Academic Performance" to the left of
the row
names when displayed with print(x).

Any thoughts?

David.



--
View this message in context:
http://r.789695.n4.nabble.com/Adding-summary-title-to-table-tp4642094.html
Sent from the R help mailing list archive at Nabble.com.