R is an open source programming language and software environment for statistical computing and graphics. It is an implementation of the S programming language combined with lexical scoping semantics inspired by Scheme.

learn more… | top users | synonyms

8
votes
1answer
888 views

Sweave generating invalid LaTeX

I've encountered a problem when I'm using Sweave to convert an .Rnw file into a .tex file. Sweave is replacing three options from hyperref's \hypersetup block with the value NA. This is the section ...
12
votes
2answers
4k views

Tables with multiple panels in LaTeX, R and Sweave

I would like to know what the accepted Sweave/R/LaTeX solution is for producing tables with "panels": multiple parts, which may or may not contain the same columns, combined into one table. The ...
5
votes
2answers
2k views

Wider tables in LaTeX, which is the best solution?

Hi I have a LaTeX table code generated from R like the following \usepackage{rotating} ... \begin{sidewaystable} \begin{center} \small\addtolength{\tabcolsep}{-7pt} ...
6
votes
2answers
491 views

Automating LaTeX tables with specifications from R

I have some latex tables generated from R-code, the sample latex table code is below \begin{table}[ht] \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c} \hline & 1 & 2 & 3 & ...
3
votes
1answer
465 views

Error when using equations and mathescape in source codes using the listings package

I want to write equations within source code that i formatted with the listings package. Therefore I use mathescape=true. The strange thing is, that it only works when I change the language of my ...
19
votes
2answers
6k views

How can I use a table generated by R in LaTeX?

I have a LaTeX table generated like this, \begin{table}[ht] \begin{center} \begin{tabular}{rrrrrrr} \hline & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline 1 & 181.21 & 169.01 ...
2
votes
1answer
772 views

Sweave only produces NAs when using Umlauts.

I have a problem with Sweave. As soon as I use any mutated vowels/Umlauts (ü, ä, etc.) Sweave produces an NA in the document although it worked before. I don't know what to do, so any help would be ...
5
votes
1answer
2k views

Difference between \Sexpr and <<>>=

I am new to sweave and learning a lot. For the most part \Sexpr works well for simple variables and also calling R functions. But other times it will fail, I have found that I can get around this ...
3
votes
1answer
474 views

Problem in StatWeave

I visited http://www.stat.uiowa.edu/~rlenth/StatWeave/ and installed StatWeave according to the instructions. But my problem is that there are no Step by Step instructions given in the manual, and ...
2
votes
1answer
1k views

Wide table problem when generating PDF

I have a LaTeX wide table generated from a data frame in R using xtable, but when the PDF is created not all the data is shown, just a part of it, and the other part is hidden on the right of the PDF. ...
0
votes
2answers
2k views

generate a PDF containing R output inside latex table

I wrote a script that generates 4 variables from 2 for loops, each one of them contain a big number of data. I want to place these variables inside a data frame and then create a latex table so I can ...
6
votes
1answer
2k views

Sweave, Beamer and ggplot2

There's literally nothing on the internet showing how these work in conjunction with one another. I would really appreciate even the simplest example of a Rnw document that you would run with Sweave() ...
0
votes
1answer
473 views

What's wrong with this Sweave Document

Every time I run the code below, it runs without error. It is only when I try to sweave the output in the last frame requested does it fail. What's more confusing to a LaTeX/Sweaving newbie like ...
1
vote
1answer
648 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 ...
53
votes
7answers
23k views

How to draw Venn diagrams (especially: complements) in LaTeX

What I am up to is to write some exercises dealing with logical formulas for my students, like: And the students should draw these formulas on Venn diagrams. At the end of the lesson, I really ...
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 ...
8
votes
5answers
2k 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 ...
91
votes
14answers
24k views

Workflow for converting LaTeX into Open Office / MS Word Format

I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or ...
6
votes
4answers
3k 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, ...