Sweave is a function in the statistical programming language R that enables integration of R code into LaTeX or LyX documents.

learn more… | top users | synonyms

1
vote
1answer
631 views

Size of Sweave Output

I am very new to LaTeX and Sweave, and I am just playing around with getting some output. That said, the "output" I am getting is very large in size (physcially on the page). For example, one output ...
5
votes
1answer
574 views

Remove\begin{Schunk} \begin{Sinput}

I am using Sweave to produce my tex. In addition I use lstlisting to highlight the source code as below. \begin{lstlisting}[caption={Computation $\widehat Y_4$ and its ...
3
votes
2answers
740 views

Using the “master file” with emacs and Sweave

One of the things I love about emacs is being able to specify a master file, then compile an included .tex file - I just use C-c C-b For sweave documents, I have the following layout: master.Rnw ...
2
votes
1answer
582 views

vim on Rnw (sweave) files: how to indent <<>>== properly?

When I use vim-latexsuite to indent my .Rnw files, the Sweave blocks get indented, which causes them not to work properly. What I need is a way to ensure that the vim indent scheme puts these blocks ...
2
votes
1answer
911 views

I cannot use Sweave to process a file created in TeXmaker (or Gedit) under Ubuntu 10.10

I am attempting to use Sweave with R2.11.1 and Texmaker on Ubuntu 10.10. I have done this previously on Windows XP, where one saves the tex file as .Rnw and then processes it with Sweave. I have all ...
4
votes
2answers
2k views

Integrate 'Sweave.sty' in the TeXLive 2010 search path (on Linux)

I'd like to add 'Sweave.sty' to my search-path, so that I don't need to copy 'Sweave.sty' to every Sweave-Document I create. I've located 'Sweave.sty' in '/usr/share/R/share/texmf/tex/latex'. I tried ...
3
votes
2answers
962 views

Supplying string parameters to Sweave document

This must be a simple question but I don't figure out how I can do it. I would like to produce a pdf report using Sweave. And actually, many many reports. I shortened and simplified the sweave code ...
8
votes
5answers
1k views

How to get correct dimensions for a ggplot2 plot in beamer

I have a beamer presentation made with Sweave that I'm preparing and was wanting to place some ggplot2 graphs in but the aspect ratio does not seem to come out correct. This is what is in my Rnw ...
9
votes
1answer
1k views

how to colorize syntax using R + Sweave?

I'm writing a LaTeX document using Sweave (a Beamer presentation, really), which weaves R code and LaTeX. Is there a way to make my chunks of code and its output highlighted? I could use listings ...
12
votes
4answers
667 views

Workflow in Sweave: Handling TeX errors

I've been using LaTeX and R for a few years now, but am only now bringing them together via Sweave. As I put the document together, I run my R code in its own session to verify that it works properly, ...
3
votes
1answer
972 views

Using Sweave, how can I reliably get .PNG figures instead of .EPS or .PDF figures?

I have tried to set the options in the preamble: \SweaveOpts{keep.source=TRUE, eps=FALSE, pdf=FALSE, png=TRUE}, but this does not reliably produce only .PNG (or indeed any!) figures. I say 'reliably' ...
6
votes
4answers
2k views

Multiple Tables Sweave/Latex

I am very new to LaTeX and Sweave but am excited that it may make my life much simpler when combined with R. What I am looking to do: Create multiple crosstabs, most likely in a loop. As a result, ...