similar to: Sweave with pdf(): how to remove mention "null device"

Displaying 20 results from an estimated 10000 matches similar to: "Sweave with pdf(): how to remove mention "null device""

2009 Jan 20
2
Sweave: conflict between setwd and \SweaveOpts{prefix.string=}
Hello I think there is a conflict between setwd() and \SweaveOpts{prefix.string=}. In the same document, those both command get Sweave confuse the files and directories. See: say my .Rnw document is in File1 If one inserts some setwd() for another file: -setwd(File2) then the command \SweaveOpts{prefix.string=graphics/Rplots} will search the "graphics" folder in File2 because of
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output in documents generated with Sweave. In the displayed pdf, the dotted line does not show up and in the printed output, it is there but does not seem to respect the lwd argument, for example, it is very faint despite using lwd = 3. The dotted line is correct in a quartz window and if I save the Quartz window to a pdf and
2010 Jun 10
1
Sweave cutting new lines
Hi, I have trouble with Sweave (I think) cutting of my newlines. As stated in the help of Sweave, I generate tex code straight from R for dynamically computed reports. If I do this in R: for (i in 0:4) {cat("\n",i,"\n")};cat("\n 3") 0 1 2 3 4 3 The output looks correct. However, Sweave for some reason seems to trim everything outside
2011 Mar 08
4
beamer overlays with Sweave?
This may be asking too much, but I'm wondering if anyone has a solution (even a hack) for creating multiple (overlay) plots in an Sweave file and post-processing the overlays in beamer appropriately. For example, suppose I have a series of figure blocks in my .Rnw file: <<plot1,fig=TRUE>>= [stuff] @ <<plot2,fig=TRUE>>= [stuff] @ <<plot3,fig=TRUE>>=
2003 Jul 29
1
Sweave: pass scale parameter to includegraphics?
Hi all I'm using Sweave and find it a treat. But one question: I use Sweave to create my pictures which are automatically included into LaTeX. For example, in the file test.Snw, I may have: % LaTeX stuff \begin{figure} <<fig=true,width=5,height=5>>= x1 <- seq(1,5, length=10) x2 <- sin(x1) plot(x1,x2) @ \caption{Plot} \end{figure} % More LaTeX This produces the LaTeX
2003 Dec 21
3
Sweave/LaTeX Problem with EPS PDF
Dear List: I am unsure if my problem is with Sweave or LaTeX. Anyhow, I am using the MikTeX distribution and TexnicCenter. I can easily create Sweave files and all goes well until I try to incorporate graphics. I use the same code as found in the examples found in the users manual. In R, the graphics I want are created as Sweave is creating the .tex file. When I examine the .tex file
2007 Jun 21
2
Need Help: User Defined R Functions in Sweave/Latex
Dear all, I want to start my post by expressing my sincere gratitude for all the help this group has given me in Sweave/Latex/R. The tools are excellent and so is the community! On to the question. My Sweave code is intended to make lots of plots and create a *.pdf document. Sweave is perfect for this. The only problem is that I find myself using the same R code, within my Sweave input file
2010 Apr 12
1
Sweave and multiple figures from an R source file
Hi, I am trying to get figures from multiple source files in Sweave. My test file is as follows \documentclass{article} \usepackage{Sweave} \begin{document} \begin{section}{notitle} This is a simple Sweave test <<gethypergraphs_rhea,fig=TRUE,echo=F>>= source("./testfig.r") @ \\ End of the simple sweave test \end{section} \end{document} where testfig.r is as simple as
2004 Mar 30
2
Sweave and graphic output locations
Hello, I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools package. I am attempting to have Sweave write files to a different directory via: testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "tools") ## create a LaTeX file Sweave( testfile, output = "C:/temp/Sweave-test-1.tex",
2007 Aug 21
4
Formatting Sweave in R-News
Hi, I am editing a document for submission to the R-news newsletter, and in my article my Sweave code inserts a dynamically generated PDF report that my R program generates. However, when I insert the PDF using the following Sweave code: \newpage \includegraphics[scale=1.0]{\Sexpr{print(location)}} \newpage (in tex this looks like): \newpage \includegraphics[scale=1.0]{/home/arjun/sample.pdf}
2006 Aug 20
1
issues with Sweave and inclusion of graphics in a document
the problem is a little hard to explain; the .Rnw files (below) probably do a better job, but here goes ... Sweave doesn't like it when i size a graphical device in a code chunk using either, e.g.: windows(width=20, height=5) in Windows, or, e.g. x11(width=20, height=5) under X, when i then plot something in said device and try to include this graphical output in the resulting
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} > x <- seq(-2 * pi, 2 * pi, 0.1) > plot(x, cos(x), type = "l", lwd = 4) \end{Sinput} \end{Schunk} \begin{figure} \includegraphics[width=0.6\textwidth]{xx-001}
2013 Feb 13
2
sweave question
Hi Everyone: I was having trouble getting the plot size correct when putting a plot in an sweave document. So, I searched on the internet and I found a clever solution where the person uses the cat function to write latex code so he can include the cat code in the chunk and place the plot using width and height. The solution is here: https://stat.ethz.ch/pipermail/r-help/2009-April/195094.html.
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2010 Aug 17
3
Sweave
Dear R users, I am using Sweave. I would like to use the width option for the graphics : \begin{figure}[h!] \centering \includegraphics[width=0.7\textwidth]{x} \end{figure} How do I get this ? Thank you very much, Randall [[alternative HTML version deleted]]
2004 Jun 11
2
Sweave and multiple graphs
Dear list, I am using Sweave to build a small report. I want to produce a series of figures, each figure containing a number of plots and then have them included in the Sweave file. An example would be to : postscript(file = "ANCbwplot%03d.eps", onefile = FALSE, other options...) oldpar <- par(mfrow = c(2,2)) .... do lots of plots to produce a number of eps files .... par(oldpar)
2010 Apr 26
1
Sweave: centering with echo=TRUE
In a .Rnw file I want to insert the R command pairs(mydataframe) and achieve the following effects 1. the command itseld is echoed into the tex document generated by Sweave <<fig=TRUE,echo=TRUE>>= 2. The graphics generated appears in the tex document, with the graphics centred. 3. The R command > pairs(mydataframe) is not centered. Sweave-manual.pdf gives the following code chunk
2010 Sep 14
1
Sweave and graphs
Hi all, Having solved my Sweave.sty question, I'd like to figure out why my pdf doesn't display the graph in my demo code. Here's the demo code I'm using: http://www.stat.berkeley.edu/~houston/demo.Rnw<http://www.stat.berkeley.edu/%7Ehouston/demo.Rnw> When I run Sweave within R (version 2.11) on the .Rnw it produces the histogram in the graphics device in R. When I then
2006 Dec 12
1
Sweave, Xfig, pdflatex and \setkeys
Dear useRs, How does one include graphics created with Xfig with LaTeX fonts into Sweave? If I create a graphic with Xfig with some Computer Modern fonts, I choose to export it as combined PDF and LaTeX. So I get two files, one foo.pdf with the drawings without the text and foo.pdftex with some LaTeX code that ensures the text lands in the right place together with the drawing. I'm supposed
2009 Jun 14
1
Centering graphics by default in Sweave
Is there an elegant way to get Sweave to center graphics by default? I'd like to use \centerline{\includegraphics{}} etc. to save some vertical space that \begin{center} ... \end{center} uses, and I'd like to avoid centering with each <<fig=T>>= Thanks Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of