yihui/knitr — Issue #29: Error using dev=tikz
Author: walmes
Created: 2011-12-02 19:32:27+00:00
State: open

I'm doing my first job with knitr (thank you and congratulations for the package). I did a very basic Rnw file containing this chunk

```R
<>=
fit=lm(dist~speed,data=cars) # linear regression
par(mar=c(4, 4, 1, .1), mgp=c(2,1,0))
with(cars,plot(speed,dist,panel.last=abline(fit)))
text(10,100,'$Y = \\beta_0 + \\beta_1x + \\epsilon$')
@
```

When compiling I get this error message

```R
Erro em switch(getOption("tikzDefaultEngine"), pdftex = getOption("tikzLatexPackages"), :
EXPR deve ser um vetor de comprimento 1
```

I don't know how solve this. When I used `dev=pdf`, the compilation was successiful. Can you help me?