[R] Hmisc latex cell background color

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Thu 15 Dec 2005 - 22:20:30 EST


Dear latex/R-Sweavers,

Using the codel below, I can color text in individual cells for latex output.
Is there a similar way to get a background shading? My attempts failed because I did not get the closing brace at the right place with Hmisc/latex.

library(Hmisc)

x <- as.data.frame(diag(rnorm(3),nrow=3)) cellTex <- matrix(rep("", NROW(x) * NCOL(x)), nrow=NROW(x)) cellTex[2,2] <- "\color{red}"
ct <- latex(x, cellTexCmds = cellTex,numeric.dollar=FALSE) ct$style <- "color"
dvi(ct)

Dieter



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Dec 15 22:41:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:39 EST