Oh..
When I change the language in lyx for Spanish to English with utf8
encoding, it's work..
It's weird, I'll have to investigate
El 17/12/12 04:39, Yihui Xie escribió:
I'm sorry but what exactly was the problem? I can compile it without
any problems in LyX, and here is a screenshot: http://imgur.com/bX7I7
Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Sun, Dec 16, 2012 at 1:30 PM, Jose Luis Cañadas
<canadasre...@gmail.com> wrote:
Hello.
I'm using lyx with the knitr (to comunicate with R language) module to
write my analysis report, and I have a problem with dcolumn packages
Example without lyx (it works)
Using gedit or Rstudio, and compile using Knitr package in R language.
\documentclass{article}
\usepackage{booktabs}
\usepackage{dcolumn}
\begin{document}
<<>>=
library(memisc)
X1 <- rnorm(1000)
X2 <- rnorm(1000)
X3 <- rnorm(1000)
X4 <- rnorm(1000)
#Create a relationship to Model:
Y <- X1 + 1.8*X2 -.12*X3 + 1.8*X4 + rnorm(1000)
Model.1 <- lm(Y ~ X1 + X2)
Model.2 <- lm(Y ~ X1 + X3)
Model.3 <- lm(Y ~ X1 + X2 + X3)
Model.4 <- lm(Y ~ X1 + X2 + X3 + X4)
tabla <- mtable(Model.1,Model.2,Model.3,Model.4)
@
<<results='asis'>>=
toLatex(tabla)
@
\end{document}
In my lyx document I write in preamble
\usepackage{booktabs}
\usepackage{dcolumn}
And the next of document is similar, with the "chunks" <<>>= @ into a TEX
box.
I think what the problem is in dcolumn package because when I write
<<results='asis'>>=
toLatex(tabla,useDcolumn=FALSE)
@
PDF is compiled but I don't get decimal-alignment.
Any idea?
Thanks.