I'm not sure if this is an R question or a Sweave question. I"m looking at students' marks from 2 time points in a simple table (Grade 3 and Grade 6). I've created the table and it prints, however I want to add labels so people know which mark is from which Grade.
My Sweave code is:
<<MakeData,results='asis'>>=
library(xtable)
Grade3 <- c("A","B","B","A","B","C","C","D","A","B","C","C","C","D","B","B","D","C","C","D")
Grade6 <- c("A","A","A","B","B","B","B","B","C","C","A","C","C","C","D","D","D","D","D","D")
Cohort <- table(Grade3,Grade6)
print(xtable(Cohort))
@
I get a nice table with counts, however both rows and columns have the same notation. How do I add a label to make it clearer?