From kfmfe04 at gmail.com  Wed Jul 29 06:22:37 2009
From: kfmfe04 at gmail.com (Ken-JP)
Date: Tue, 28 Jul 2009 21:22:37 -0700 (PDT)
Subject: [Rd]  xtable formatting: RED for negative numbers?
Message-ID: <24712197.post@talk.nabble.com>



I've been experimenting recently with the fantastic Sweave/xtable
combination for generating latex.  In the xtable vignette, I found this
great example of printing a ts object by months.

Is there a way to modify this code to generate RED numbers inside xtable for
negative results in x.ts?
Thanks in advance.

- Ken

# Sweave/xtable snippet below
--------------------------------------------------------------

\begin{table}[ht]
<<sample,echo=F,results=tex>>=
x.ts <- ts(rnorm(100), start = c(1954, 7), frequency = 12)
x.table <- xtable( x.ts, digits = 1 )
print( x.table, floating = FALSE )
@
\end{table}


-- 
View this message in context: http://www.nabble.com/xtable-formatting%3A-RED-for-negative-numbers--tp24712197p24712197.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] xtable formatting: RED for negative numbers?
Ken-JP