Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Up to this morning Sweave() was regularly creating images in png format (I used png=T as an argument).

At some point Sweave would no longer create any PNG image (this is a problem for me 'cause running MikTeX I found tricky managing pdf or eps pics).

Now I have checked over any possible modification and inadvertences in the .Rnw file ultimately even retrieving files from my usb that used to work normally yesterday, I have shut off R session many times to reset possible unwanted changes to the settings, result= nothing.

It is like all of a sudden Sweave would not work properly anymore. I know this does not make sense, in fact is quite odd thing happening to me since!

Any suggestion is appreciated

PS: Only thing I've been thinking to is me messing around with getOption(default=) and option(default=), but as I said I relaunched brand new R sessions several times to be sure normal settings were restored.


My R platform is:

R version 2.11.1 (2010-05-31) 
i386-pc-mingw32 

locale:
[1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252   
[3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C                  
[5] LC_TIME=Italian_Italy.1252    

attached base packages:
[1] tools     stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] xtable_1.5-6    AICcmodavg_1.14 nlme_3.1-96     aod_1.2        

loaded via a namespace (and not attached):
[1] grid_2.11.1    lattice_0.18-8

I run on MiKTeX 2.9.

Consider this trivial example:

% .Rnw file

\documentclass{article}

\usepackage{Sweave}

\SweaveOpts{keep.source=TRUE}

\begin{document}

\title{INTERNAL REPORT}
\date{}

\author{\textbf{Federico Bonofiglio}}

\maketitle

<<echo=F>>=

options(prompt=" ", continue= " ")

<<>>=

x<-rnorm(500,mean=3)

mean(x)

@

\begin{figure}

<<fig=T>>=

plot(x)

@

\caption(ciao)
\end{figure}

@

\end{document}

and the R code is:

setwd("C:\\your folder")


Sweave("prova",png= T, pdf=F)


library(tools)

texi2dvi("prova.tex",pdf=T)

NOTE that the Sweave command above has been working nicely for me up to this morning (i.e. producing PNG files and not EPS or PDF ones).

I'm very puzzled and frustrated. It seems like Sweave() has forgot about the PNG option.

share|improve this question

closed as off topic by Marco Daniel, lockstep, Joseph Wright Dec 3 '11 at 23:00

Questions on TeX - LaTeX Stack Exchange are expected to relate to TeX, LaTeX or related typesetting systems within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Could you add a minimal example illustrating this problem? –  Seamus Sep 21 '11 at 14:15
1  
Welcome to TeX.sx! Your question have unclear passages, e.g. "....I ahve shut off R session many times to reset possible unwanted changes to the settings....., result= nothing." Could you please clarify your question and provide a minimal working example (MWE) that illustrates your problem. –  N.N. Sep 21 '11 at 14:15
1  
This is very close to being off topic, (namely an R problem rather than a Sweave/TeX problem) unless you can provide more information. –  Alan Munn Sep 21 '11 at 16:36
    
Your minimal document has no @ after your options command and an extra @ at the end. –  Aaron Sep 22 '11 at 14:44
add comment

Browse other questions tagged or ask your own question.