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

1
vote
2answers
917 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 ...
2
votes
1answer
65 views

Column Vector Sweave \Sexpr

I'm having big problems trying to compile a file using Sweave displaying a vector defined in an R chunk, as a column vector in Latex using pmatrix, I have something like this: ...
1
vote
1answer
76 views

Removing hline when producing latex code for table in R with Hmisc package

I have been struggling with this for some time and can't really find an answer. By default the latex command in Hmisc package cab generate code for table with hline on top, below header row and after ...
1
vote
1answer
197 views

Sublime Latexing and Knitr on .RNW files : Send lines to R console for evaluation

I am using Sublime Text 3 and the Latexing package to apply Knitr to compile .Rnw files that contain both Latex and R code. Overall, it works well in that I can compile the .Rnw files into PDFs ...
0
votes
1answer
17 views

Knitr and rmarkdown will not add figure captions to the output

I am writing a report on Rmarkdown and knitr using RStudio, and cannot find a way to get figure captions on my document. My code for the chunk where I try to plot is like: ```{r ...
6
votes
0answers
269 views

Arguments of R Functions in Beamer with knitr

I'm using helpExtract.R function (can be obtained from here) to get arguments of R functions in Beamer with knitr. My (.Rnw) MWE is \documentclass{beamer} \usepackage{ragged2e} %new code ...
5
votes
0answers
139 views

TeX-function for writing R-functions

I'm working on an introductory course for the R-language in Latex, so I'm trying to write a Latex function that displays the R-function. This is what I've got: \makeatletter \newcommand{\fun}[3]{ ...
4
votes
0answers
105 views

How to mantain consisten font size in different plots

I usually embed numerous R plots in my TeX documents. knitr is very handy in helping me producing plots using the same font family of the TeX document. But a different problem of consistency is given ...
3
votes
0answers
183 views

Include R output as pdf in Texmaker

I just switched from texshop to texmaker on Mac OS X. However, now the plots I want to insert from R as pdf in the document are missing the fonts in the pdflatex output. It used to work fine with ...
3
votes
0answers
345 views

How to keep ggplot font size constant when varying figure width

I have different figures across my document with different width. I set the the font size for all ggplots globally with theme_set(theme_bw() + theme(text=element_text(family="Palatino", size=20))) but ...
2
votes
0answers
51 views

knitr: Several figures with subcaptions, alignment issues

Here is a minimal working example: \documentclass{article} \usepackage{subfig} \begin{document} <<echo=FALSE,out.width="0.49\\linewidth",fig.show="hold",fig.align="center",fig.cap="Some ...
2
votes
0answers
114 views

Configure R Studio to use Biber for APA on Beamer Slides (Biblatex + Biber + R Studio + MiKTeX)

I'm trying to generate with R Studio a beamer presentation that uses backend=biber option. Here is my MWE: \documentclass{beamer} \usepackage[american]{babel} \usepackage{csquotes} %apa requires ...
2
votes
0answers
64 views

knitr pdf search invisible text

I use the fantastic knitr to generate beamer-pdf’s with hundreds of slides of plots. Every plot shows data of different measuring equipment, so for example the plot showing result of measuring ...
1
vote
0answers
29 views

Best practice for ggplot transparency in pdf figures

I lost a couple of hours because of few transparent figures which Adobe Professional couldn't flatten to print (it crashed in the process). I wonder if there's any trick to produce PDF figures with ...
1
vote
0answers
40 views

Knitr and numbers

I return to a question, which is few months old and then maybe not yet the best practice around. I use the siunitx package in my documents along with knitr to compile my R chunks. As far as I ...
1
vote
0answers
82 views

R assignment operator (“<-”)

How does one typeset the R assignment operator ("<-")? Workarounds such as \begin{description} \item[x \textless{}- c(1:3)] Create the vector [1 2 3] and assign it to an object named x. ...
1
vote
0answers
53 views

Table-caption rotated wrongly

How can the table-description in tufte-handouts be placed correctly with sideways-tables and xtable? See following minimal reproducible example where the figure-description is corrrect (stolen from ...
1
vote
0answers
32 views

Include .Rtex as a chapter in latex

I have an Rtex that contains: \documentclass[openany]{book} \chapter{Introduction} \input{./Introduction/Introduction} \chapter{Thesis Outline} \input{./Outline/Outline_Chapter} ...
1
vote
0answers
77 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 ...
1
vote
0answers
123 views

Use Xtable to do plus minus

I am using a similar dataset to the following: a= c("Fruits", "Adam","errorA", "steve", "errorS", "apples", 17.1,2.22, 3.2,1.1, "oranges", 3.1,2.55, 18.1,3.2 ) ...
1
vote
0answers
127 views

Knitr/LaTeX: conditional execution based on external parameters

I'm using knitr to create LaTeX documents with integrated R code. Now I'd like to readout some external parameters (saved in a TXT or CSV file) and create a document based on the conditions specified ...
0
votes
0answers
44 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
42 views

Place multiple tables in a grid on a single page

I need to show several tables and figures on a single page. They are of different heights and widths and I would like to build a grid in which I could then put them. Is there a package that would ...
0
votes
0answers
109 views

“Math Processing Error” when processing LaTeX using knitr in R

I've never had any problem with my Latex appearing properly when using knitr before, but recently when I compile my document, I get this error: I'm not sure why this is happening. The error output ...
0
votes
0answers
66 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
241 views

Packages for Typesetting Specific R Output

Anyone know of a package that translates R output into LaTeX code for the following types of commands? exp(w1$coefficients) exp(confint(w1)) My input/output with the xtable and stargazer R ...
0
votes
0answers
145 views

knitr yielding different output in pdf than in R console

I am running RStudio Version 0.98.484 and R version 3.0.2 on OS X Mavericks. While using knitr I noticed a discrepancy between the console output from a summary() command and that generated in the ...
0
votes
0answers
71 views

How to include multiple \Sexpr values within LaTeX math mode tags?

As part of my work, I am expected to show calculation steps with sample values. To do this, I usually just replace the variable names with \Sexpr{} to add in the values. For some reason \Sexpr{} ...
0
votes
0answers
211 views

How can I use a table generated by Latex in R(xtable)?

I have a LaTeX table generated by Excel. I want to place this table but not as a LaTeX code, but rather as a xtable. It is possible to convert LaTeX to xtable?