Displaying 1 result from an estimated 1 matches for "ttextcolor".
Did you mean:
textcolor
2012 Apr 03
3
Sweave xtable
...uot;p", "r")))
@
\caption{The cats data from package MASS.}
\label{fig:cats}
\end{figure}
\begin{center}
\end{center}
\section{Intento 1}
<<results=tex>>=
da <- data.frame(id=letters[1:5], score=1:5*2)
col <- function(x){
ifelse(x>7,
paste("\ttextcolor{blue}{", formatC(x, dig=2, format="f"), "}"),
paste("\ttextcolor{red}{", formatC(x, dig=2, format="f"), "}"))
}
da$score.string <- col(da$score)
require(xtable)
xtable(da[,c("id","score.string")])
@
\section{Inte...