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

2
votes
2answers
1k views

KILE Sweave Error - “Cannot open log file; did you run LaTeX?”

I am using Sweave to generate a pdf from a .Rnw file. I added a new build configuration in Kile using Kile's build-configuration settings. Settings > Tools > Build OS is Windows 7. How do I ...
4
votes
1answer
412 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 ...
4
votes
0answers
199 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
95 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
131 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
38 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
114 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 ...
1
vote
0answers
104 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
84 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
51 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 ...
1
vote
0answers
153 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
133 views

How to keep title, table and caption together in 1 page?

I have one table which is dynamic (number of rows varies from 2 to 20). This table has title and caption. But I need title, table and caption all 3 should be in the same page i.e. need to avoid title ...
1
vote
0answers
85 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
23 views

Table error: Not in outer par mode

I'm using Latex and Sweave. The example below is a MWE of my .Snw file. \usepackage[utf8]{inputenc} \usepackage[portuguese]{babel} \usepackage{amsmath} \usepackage{amssymb} \usepackage{colortbl} ...
0
votes
0answers
39 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
37 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
70 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
24 views

Why does \usepackage{Sweave} change table width?

Recently is has been indicated (Why could \usepackage{Sweave} be affecting my graphics scaling?) that adding \usepackage{Sweave} to your preamble might change the width of your graphics. Peter solved ...
0
votes
0answers
29 views

How to use texmaker with Sweave?

I've tried to use Sweave with texmaker but it doesn't work. I go to the menu "R Sweave", I push the button "->" and texmaker creates a wrong latex file with a lot of "NA". When I try to do pdflatex ...
0
votes
0answers
48 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
89 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 ...
0
votes
0answers
52 views

Is it possible to place a chunk within a chunk?

I am asking this question because I need to loop a \section tile by a chunk and place the according result in the section using another chunk. Here is an example of one circle: The chunk for ...
0
votes
0answers
184 views

xtable for multiple lm regression in R?

I'd use xtable for an object from a multiple lm regression but always failed. Here is an example: df<-data.frame(y1=rnorm(100,2,3), y2=rnorm(100,3,2), x1=rbinom(100,1,0.5), x2=rnorm(100,100,10)) ...