similar to: Sweave and graphic output locations

Displaying 20 results from an estimated 10000 matches similar to: "Sweave and graphic output locations"

2008 Nov 18
1
Sweave
Dear All, I have both R 2.80 and Scientific Workplace 5.5 installed on my computer. I copied the following commands from HTML help provided by R: testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") Sweave(testfile) I then compile Sweave-test-1.tex file using Scientific Workplace 5.5. Apparently, Scienfic Workplace 5.5 does not recognize
2008 Jun 17
3
Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
R users, I'm at a loss with a problem considering running .tex files produced by Sweave. When I run (R 2.7.0): --------------------------------------------------- #Taken from ?Sweave testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") ## enforce par(ask=FALSE) options(device.ask.default=FALSE) ## create a LaTeX file Sweave(testfile)
2012 Aug 21
1
patchDVI: how to pass encoding of the .Rnw file?
On 12-08-19 3:47 PM, Marius Hofert wrote: > Dear Duncan, > > I recently asked a question concerning patchDVI on r-help, see > > ,---- > | https://stat.ethz.ch/pipermail/r-help/2012-August/321780.html > `---- > > Unfortunately, no one could help. I was wondering if you know a solution to the > above problem. Any hint is highly appreciated. Sorry, I'm writing this
2011 Aug 04
4
Sweave - landscape figure
Dear R-users I am trying to understand how Sweave works by running some simple examples. In the example I am working with there is a chunk where the R-commands related to plotting a figure are placed. When running R CMD Sweave ? , pdflatex the output is a portrait figure. I wonder whether it would be possible to change the orientation to landscape (not in the latex file but in Rnw file). Many
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>>=
2002 Oct 10
3
Sweave (PR#2142)
In the 'RWeaveLatexSetup' function in the 'tools' package in R 1.6.0 , the code below does not work (pdflatex can't find 'Sweave.sty'): if (stylepath) styfile <- file.path(R.home(), "share", "texmf", "Sweave") else styfile <- "Sweave" In R 1.5.1, that was: if(stylepath) styfile <-
2002 Oct 10
1
problem with Sweave on 1.6 on NT4
Hi, I recently compiled 1.6 on NT4 but I am having a problem with Sweave. Using the inbuilt 'Sweave-test-1.Rnw' file as an example: ------- > library(tools) > testfile <- file.path(.path.package("tools"), "Sweave", "Sweave-test-1.Rnw") ## create a LaTeX file Sweave(testfile) testfile <-
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}
2008 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus, I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R? ################################################ \documentclass{article} \usepackage{Sweave} \begin{document}
2005 Jul 08
2
Sweave resource leak: leftover temp files (PR#7999)
This is great. Thank you for your help, but let me make sure I fully understand. Here is the looping file I use to subset the data frame, create a tex file, and Sweave it. This results in N number of tex files where N is equal to the number of rows in the data frame. list <- unique(wide$stuid) master = "master.tex" for (i in list){ tmp1 <- subset(wide, stuid==i) tmp2
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
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
2008 Nov 29
3
including Sweave tangled code in '.Rnw' document
Hello List, I have been using Sweave for my homework this last quarter and have been very impressed at how much time and effort it saves me. I, however, have run up against a problem which I have not been able to solve using any of the Sweave/LaTeX tricks I know. I work through my homework one problem at a time, typesetting equations and writing R code, etc. and occasionally use
2005 Jul 08
4
Sweave resource leak: leftover temp files (PR#7998)
Harold, I've taken a closer look at your example and I'd call this an Sweave bug. It creates tempfiles each time you run it, and doesn't delete them at the end. For example: > list.files(tempdir()) character(0) > testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") > Sweave(testfile, out="junk.tex")
2008 Sep 06
2
Sweave and/or beamer issue
Dear Friends, I not sure whether this is an Sweave or a beamer problem. The Rnw file: \documentclass[compress,smaller]{beamer} %\documentclass{article} %\usepackage{beamerarticle} \usepackage{Sweave} \title{Psychophysics II} \date{September 9, 2008} \begin{document} \frame{ \begin{Schunk} \begin{Sinput} > ro <- 0.2 > c <- seq(from = -3, to = 4, by = 0.1) > fn <- 1 -
2012 Feb 20
2
Computing plot size in Sweave
Sometimes you want to compute the physical size of a plot based on data. In R itself this is no problem. But is there a way to compute the values of height and width in S-weave, say: <<graph,fig=TRUE,height=xx,width=yy>>= where xx and yy are computed and not physically written in the document? Bendix ______________________________________________ Bendix Carstensen Senior
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
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}
2009 Apr 13
2
I want to use Sweave, but only sometimes
Does anybody have a workable system to run an Rnw document through R-Sweave when necessary, but to just run it through LaTeX if no new R calculations are needed? I.e., the figures already exist, I do not need R to do more work for me, so I send the document straight to LaTeX. I want to leave open the option that I might need to run the document through Sweave in the future, so I don't want
2010 Feb 12
1
Sweave
Hello, I am trying to start using Sweave. I copy the example from help Sweave testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") ## enforce par(ask=FALSE) options(device.ask.default=FALSE) ## create a LaTeX file Sweave(testfile) ## This can be compiled to PDF by tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE) and I