I am conducting cross tabulation between two variables using the "prop.table()" function. How can I label the row, columns, and title to increase readability. code below.
prop.table(table(hl$high, hl$midwest),1) * 100
I am conducting cross tabulation between two variables using the "prop.table()" function. How can I label the row, columns, and title to increase readability. code below.
prop.table(table(hl$high, hl$midwest),1) * 100
It's a data.frame you can do whatever you like
z <- prop.table(table(mtcars$cyl , mtcars$am),1) * 100
rownames( z ) <- c( "Four","Six","Eight")
colnames( z) <- c("Does Not Have","Does Have")
print( z)