Using xyplot with Knitr (TexStudio), panels were created but no data points (when compiling using RStudio, everything is fine)

10 views
Skip to first unread message

Yi Tang

unread,
Apr 21, 2017, 12:59:20 AM4/21/17
to knitr
Hi all,

I am pretty new to Knitr, and currently using TexStudio with knitr.

I found a weird problem: when I am trying to use xyplot, knitr can generate all the panels but the panels are empty. For example:


<<p2-1>>=
require(faraway)
require(nlme) 
data("attenu") 
head(attenu) 
require(lattice) 
xyplot(log(accel) ~ log(dist) | event, data = attenu, layout = c(6,4))
@

Then I get:


However, it should be (and can be generated in RStudio using Knitr, exact same codes):


Can anyone help me and explain why I got different plots in RStudio and TexStudio?


Thanks,

Yi


Reply all
Reply to author
Forward
0 new messages