I'm trying to create a Latex table with xtable
. Some of my column names are rather long, so I decided to fix the width of the the respective columns. However, once I fix the width of the columns I lose the column justification.
Simplified example:
counts <- c(1,2,3,4,5,6,7,8,9)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
temp <- data.frame(treatment, outcome, counts)
temp2.table <- xtable(temp)
align(temp2.table) <- "rp{1in}cc"
colnames(temp2.table)[1] <- "This column title label is too long"
I would like the numbers which appear in the first column to be right justified.