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

4
votes
1answer
706 views

Color first row in a xtable generated table

I am trying to color the FIRST row of my table. But if I add \rowcolor[gray]{0.95} to the FIRST row the colored row will be the SECOND. Indeed it is quite straight forward to modify from the second ...
3
votes
1answer
608 views

Sweave and Knitr Figure Size

I recently made the switch from using Sweave to Knitr in order to gain Knitr's ability to cache R code chunks. So far its been fairly straightforward except for one thing. I cannot seem to find an ...
4
votes
0answers
299 views

RStudio, Sweave and synctex

For a few days now I was wondering why RStudio stopped showing the "Sync PDF view to editor location". I still don't know for sure, but since my .synctex.gz file is apparently "(busy)" I assume there ...
2
votes
0answers
49 views

Iterating through a character/string array in LaTeX

I have an array of strings, and am trying to output each element into LaTeX. I am able to achieve that using the following code: \documentclass[12pt,english,nohyper]{tufte-handout} ...
2
votes
0answers
75 views

How to export changes from a .tex file back to the source .Rnw file

Let's say my work-flow is writing a paper with multiple R chunks as a .Rnw then compiling it into a .tex file and then typesetting it into the final document. Now, after the document has been ...
2
votes
0answers
115 views

Can a TeXShop engine set the #PDFPATH#?

I have written an engine to run Sweave (a preprocessor) from TeXShop. It works fine on simple projects. For complicated projects (e.g. books), I might want to run the preprocessor on a chapter (e.g. ...
2
votes
0answers
160 views

Sweave (using R Studio) with AEA class

Apologies for the newbie question! I've been having some problems trying to get a minimal working example using Sweave with a the AEA document class. My minimal example works as a .tex file, but the ...
1
vote
0answers
27 views

suppress debug in console

I am writing my thesis in latex and I am having trouble with the console output. Everything compiles properly, but I have pages and pages of debug messages in the console. Although not a huge issue, ...
1
vote
0answers
61 views

Creating functions in Sweave

I have a Sweave .Rnw file in R. It does a few things across chunks: Chunk 1: Selects a random integer between 1:4 and saves as variable nPlots. Chunk 2: Writes nPlots (random integer selected ...
1
vote
0answers
118 views

Compiling .Rnw file into PDF in RStudio (Error: No file or directory)

I have a .Rnw file. I usually can "Compile" it into a PDF file in RStudio. However, I recently upgraded my R Version to 3.2.0. Now, when I try to "Compile" my .Rnw file I get an error: ...
1
vote
0answers
64 views

Blog publishing / creation from Latex

I have been using Latex for a few years, and have several articles written in Latex. I want to share some of these articles on blogs, and I am very new to the blogging world. Just wondering if there ...
1
vote
0answers
58 views

Using xtable with listings package

I am the listings package as suggested by the following solution provided in this question: Getting Sweave code chunks to stay inside page margins? More specifically, I am using the following piece ...
1
vote
0answers
50 views

How to use pgfplotstabletypeset in combination with sweave

I am trying to make a table in LateX in which the background colour of my cells depend on the size of a number. I found some answers on Parametrize shading in table through TikZ but I cannot get them ...
1
vote
0answers
268 views

Control stargazer table output in combination with mathpazo and siunitx

I like the idea to control all my numeric outputs with the smallest number possible of packages. I use mathpazo to control my fonts and siunitx to control formatting. Yet when I knit a LaTeX table ...
1
vote
0answers
147 views

Error R Sweave and Knitr Plugins at WinEdt 8.0?

I try a simple example document .rnw at WinEdt with R Sweave Plugin like this : \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} \textbf{hello world} ...
1
vote
0answers
177 views

Define style of xtable

I want to set the style of tables built with xtable by looping on multiple dataframe. I then look for some macro so to set the style in the preamble and not directly within the tabular environment. ...
1
vote
0answers
101 views

Jump from PDF line into .Rnw (with Skim)

I have a LaTeX document saved as .Rnw which I compile with Sweave to get a .tex document and finally-once compiled with LaTeX, a PDF. Now with Skim I can jump from a line in the PDF back into the ...
0
votes
0answers
21 views

xtable: trim horizontal lines in table so there is no indentation

I can make a table using xtable: \documentclass[12pt,a4paper]{extarticle} \usepackage[margin=15mm]{geometry} \begin{document} <<xtable,echo=FALSE, results=tex>>= library(xtable) df ...
0
votes
0answers
40 views

Latex in R getting error after putting code

I am getting this error in R ...after putting code for latex document Undefined control sequence Overfull\hbox(7.71355pt too wide) in paragraph at lines 16--16 Code is below ...
0
votes
0answers
49 views

Sweave's “fig=TRUE” cannot write file

I use Sweave to get my R data into LaTeX. While this works fine with "just data", I am not able to include plots. My .Rnw-file looks like this: \documentclass[a4paper,10pt]{article} ...
0
votes
0answers
46 views

Sweave in TexShop

I am trying to configure Sweave directly from Texshop, currently I am using versions 3.44 and 3.11 (Maverick build) for Textshop and R respectively. I have followed the instructions given on the ...
0
votes
0answers
71 views

Problem with Latex and Sweave

I want to use Sweave package of R to integrate my R scripts directly in Latex documents. I'm using v3.1.1 of R, where Sweave.sty is directly integrated (in R-3.1.1/share/texmf/tex/latex). I'm using ...
0
votes
0answers
161 views

Convert .R into Latex

I'm really new at this and I couldn't found any realted subject. So I've created my .R file where I generate my graphs from my data: barplot(wmaefile$FC,xaxt="n",col="snow2",border="black", ...
0
votes
0answers
51 views

Sweave pdf is failing

fig=TRUE month.=season(x03) x03.lm=lm(x03~month.+time(x03)) summary(x03.lm) @ This part of my file is failing and I am not sure why. I have attached library(TSA) for the season part, but it ...
0
votes
0answers
127 views

Make .Rnw child document independent from main document

This is a followed-up question to this answer. I have a variables.Rnw document in charge with the task of loading data from R datafiles and create R variables that I will then compile into a .tex ...