miraisolutions / xlconnect

XLConnect: Excel Connector for R
129 stars 32 forks source link

XLConnect with Sweave image issue #31

Closed abreups closed 9 years ago

abreups commented 10 years ago

When I load XLConnect in R Studio and attempt to generate a pdf document using Sweave, the images are not generated. If I do not load the XLConnect library, then everyting works fine. Here is a code example:

\documentclass{article}
\begin{document}
\SweaveOpts{concordance=TRUE}
<<>>=
setwd("/home/paulo/R")
@
If XLConnect library is loaded, images are no longer generated and 
not loaded into the final pdf file.
<<>>=
#library(XLConnect)
data(airquality)
@
Plot.
<<fig=TRUE,width=4,height=4>>=
barplot(airquality$Ozone, airquality$Month, col="red", xlab="Month")
@
\end{document}

Put this in a file called, say, xlconnect.Rnw and try to generate the document in R Studio. If the # that comments the library(XLConnect) command is removed, the image is not generated nor loaded into the final pdf. I'd appreciate any insight.

martinstuder commented 10 years ago

I can't reproduce that issue with RStudio 0.98.1049 and XLConnect 0.2-9 on Ubuntu 14.04.1. What version of RStudio and XLConnect are you using?

martinstuder commented 9 years ago

Also not reproducible on Windows 7 with R 3.1.1, RStudio 0.98.1062 and XLConnect 0.2-9. Please re-open the issue with more details (versions of platform, R, RStudio, XLConnect, ...) if the problem persists.