Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Hmisc latex cell background color

Dieter Menne

2005-12-15

Replies:

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@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.