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

2
votes
1answer
38 views

Appending an empty row after every 5 or 10 rows in LaTeX table

I wonder how to append an empty row after every 5 or 10 rows in LaTeX table. Here is my MWE in .Rnw format. Any help will be highly appreciated. Thanks \documentclass{article} \usepackage{longtable} ...
5
votes
1answer
273 views

New R Logo with Tikz

I want to make the following new R logo with tikz. My MWE with output is: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[] \node[blue] at (0,0) {R}; \draw ...
2
votes
0answers
33 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} ...
3
votes
0answers
78 views

Pgfplots Boxplots with a thick line at the mean value

pgfplot produces nice looking plots, that have consistent look and feel. But sometimes you have a good reason to change that look, and I found it tricky to change style of an specific line, circle, ...
1
vote
1answer
31 views

knitr: less/greater than sign displayed as (¡) and (¿)

I'm a beginner in using knitr to generate a report. I have a R script (see below for an example; BTW I'm using RStudio for all of this) that runs without error and the output is a data frame. My ...
1
vote
0answers
18 views

incorporating R code in latex, commentstyle not working

I have an issue with no all my R comments being colored in my latex file. I am using the listing package. My pre-amble code is \lstset{ % language=R, basicstyle=\footnotesize, ...
1
vote
2answers
55 views

Conditionally print text with inline R data via knitr

I want to conditionally print a sentence that contains a \Sexpr{} in knitr. How can this be done? I know I can conditionally print text using \Sexpr{} but I run into issues when the text to be printed ...
0
votes
0answers
25 views

Changing lisoffigures color in Rmarkdown

I'm using Rmarkdown with Rstudio to create PDF, and I add the option \listoffigures, but the font color of the links are pink. I tried to add some TeX option to change it like ...
1
vote
1answer
40 views

How to adjust float options of Tikz picture

I am trying to include several Tikz figures drawn in R, below eachother in a Latex file. It keeps including the figures at the top of new pages. Is there an easy way to make this work? The simple ...
1
vote
1answer
34 views

PDFLaTeX basic installation in windows for R pdf output for slow internet

I have a windows operating system. I'm using R statistical software. I have to output a R MarkDown file into pdf. This can be done by PDFTeX which requires installation from MiKTeX. R suggests that I ...
1
vote
0answers
46 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 ...
0
votes
1answer
39 views

Import tables into master latex file (like graphics).

I am working with R and Latex and using R to generate a series of tables that I am exporting as a unique latex script each (e.g. it exports the table formatted for latex in a new script). I would like ...
0
votes
0answers
12 views

Fill arbitrary number of “template analysis page” based on data output by R

I'm using knitr to produce a report on anomalies detected in a machine. I've got an R script that searches for anomalies (there can be an arbitrary number of anomalies) and the script also produces a ...
0
votes
0answers
40 views

Errors with untouched Beamer Template in RStudio

I am new to using Beamer, and wanted to have a template working so that I could, for the time being, simply and easily change the content. I downloaded the .zip file from ...
1
vote
0answers
93 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: ...
2
votes
1answer
90 views

How to use Umlauts (äüö) in axis label with knitr, LuaTex and tikz?

When compiling pdf documents with complex tikz figures using knitr, the pdftex engine would sometimes run out of memory. Thus, I used the luatex engine to compile these Rnw files. However, I am not ...
0
votes
1answer
64 views

Modify R output in LaTeX

I'm currently writing a paper for my bachelor thesis with LaTeX. I'm pretty new to LaTeX and I was wondering whether I can modify the R output in LaTeX. For Example: If I type in this: ...
1
vote
1answer
65 views

How to get the TexCalendarCompetition.Rnw build?

The TexCalendarCompetition.Rnw refers to Nicholas Hamilton's code contribution to the TUG calendar 2015 (see Nicholas' answer for details)
1
vote
0answers
37 views

Including graph using tikz causes not including bibliography file

I am experiencing problems using package tikz. I have produced a graph in R and want to include it in my tex file using package tikz. After I include the the tex file with graph in myfile.tex with ...
2
votes
1answer
66 views

how to combine different tex files to a single file and generate pdf using R

I have three data frames which I would like to put to pdf. I generate tex files for the three dataframes. So I have three tex files. I would like to combine it and generate pdf in R. Right now I use ...
1
vote
1answer
89 views

Capturing final figure caption using knitr

I'm writing a paper for the journal PLOSone. They require that figure captions be placed in the article but not the figure itself (it's submitted separately). So I'm wondering how to get knitr to ...
2
votes
0answers
104 views

R-code linebreaks AND themes in knitr

hpesoj626 provides two great minimal working examples for how to get R-code linebreaks AND code highlighting in knitr. I was wondering if it was possible to use Yihui's knitr themes within either of ...
1
vote
0answers
67 views

Table dull when transferred from R to word [closed]

I am using latex in R (mostly copied codes) to make beautiful tables. But transferring tables with the help of snipping tool used or saved as jpg from R to word, the table looks dull and not rich ...
0
votes
0answers
38 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
52 views

R data.table and knitr

I have an automated report that i produce using knitr. i'm running across the oddest problem. I wrote a function that sums the data by month for several locations. when i run this function in R i ...
0
votes
0answers
44 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} ...
1
vote
1answer
60 views

Why does this fail in LyX 2.1.3 but works in .Rnw?

This code works fine in .Rnw but does not work in LyX 2.1.3. In LyX 2.1.3 it throws the following error: Error in getModel.baseGmm(all_args, ...): could not find function "is" Any idea how to ...
5
votes
0answers
103 views

What are the advantages of switching to Emacs for TeX/knitR work?

Currently, I am using TeXStudio. Now, I am considering to switch to Emacs because I heard that is has its advantages when it comes to R and knitR. But what are the specific advantages? Yet, I am still ...
0
votes
0answers
159 views

Best way to Insert R code into a LyX document

Let's suppose that I have a set of R (3.1.2) scripts that I would like to display in LyX (2.1.2). I could use Program Listings, but I think this looks very unprofessional. I am wondering if anyone can ...
1
vote
1answer
65 views

Cropping an image generated in R code

I would like to crop an image that is not inserted (which has been searched a lot), but an image that is generated in R code. \documentclass{article} \setlength{\parindent}{0pt} ...
2
votes
1answer
94 views

Venn Diagram Automation tool

I would like to ask if there is a solution in any language that can help me create and maintain a venn diagram similar to the one below that I can insert in my latex text. I have already found some ...
2
votes
1answer
110 views

How to modify knitr output chunk

I know that it's possible to tweak the output of a knitr code chunk so that it looks the way you want. My problem occurs when using the parskip package. The parskip package adds an extra bit of space ...
1
vote
0answers
49 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 ...
0
votes
0answers
37 views

tikzDevice equivalent for SAS

tikzDevice is an interesting package capable of transforming graphical output from R to a LaTeX code. I used this package and I was satisfied. Does an equivalent for SAS exists. Thanks !
2
votes
3answers
148 views

What's the best .Rnw editor?

I'm trying to find out what people use for editing .Rnw files. Desirable features are: Auto R code completion Auto LaTeX code completion Cross platform Automatic display of R function documentation ...
2
votes
1answer
320 views

What is the best way to include R code in the Latex paragraph

I am a newbie in Latex. I have two simple questions regarding including R code in Latex. Q1: For a block of R code, I use 'listings' package, as follows. \documentclass[12pt]{report} ...
1
vote
0answers
176 views

Problem using tikzDevice in knitr

I can't seem to get knitr to work with tikzdevice. A simple example: \documentclass{article} \begin{document} <<test, dev='tikz'>>= library(knitr) library(tikzDevice) library(ggplot2) ...
4
votes
1answer
123 views

Pass a class/package/theme option to R with knitr

I have a beamer document with R chunks, say 'template.Rnw', which I compile with knitr using 'compile PDF' in RStudio. I have defined a theme 'mytheme.sty'. I would like to have an option to the theme ...
4
votes
1answer
216 views

lstlisting R keywords

I want to write R source code in my latex file so I'm using the listings package. The problem is that I want R keywords to appear in blue but for instance a variable named abc.log.de appears with log ...
1
vote
1answer
85 views

Unexplained “NULL” in pandoc.table in ioslides [closed]

I'm attempting to use pander::pandoc.table() in a ioslides slide and I can't figure out how to get rid of the NULL caption at the bottom of the table. With this example code: ```{r, results='asis', ...
2
votes
1answer
171 views

insert figure in sweave using knitr fig.path Version 2

I have a question similar to this post. I am trying to add a .jpg to a .Rnw file (compiling LaTex with RSweave and knitr). I've tried the following without success: ...
1
vote
1answer
190 views

How to include a .TeX file generated from .Rnw file into a .TeX file which is child of parent .TeX file?

I really need help. Here is the problem: I'm writing my dissertation using a LaTeX template (http://www.latextemplates.com/template/masters-doctoral-thesis). The template is a parent file with ...
2
votes
1answer
315 views

RStudio problem with xtable “results=tex”… “object tex not found”

I am using the 'compile pdf' button in a .Rnw file in Rstudio, including the following: <<longterm1, results=tex, echo=FALSE>>= print(xtable(longterm), include.rownames=FALSE, ...
3
votes
1answer
127 views

\mathplus fails to render

I'm new to LaTeX - can anyone suggest why the $\mathplus$ is not rendering as +? It can be seen in the bibliography entry of another question, publisher = {Springer Science $\mathplus$ Business ...
4
votes
0answers
150 views

tikz stops drawing into pdf after 20 line segments in plot generated through knitr tikzDevice

Problem If I try to draw a curve generated through knitr using tikzDevice into .pdf only 20 line segments of that curve are drawn and TeXstudio, through which I do it, just leaves message running ...
1
vote
1answer
162 views

How can I nest a code chunk within an enumerate environment when using R Markdown?

When I attempt to do this using this code: --- title: "Title" author: "Me" date: "31 October 2014" output: pdf_document: includes: in_header: includes.sty --- ...
2
votes
1answer
240 views

Special characters and math-mode in tikz graphics using knitr

This question closely relates to this one: Using '$' in a tikz plot generated by knitr I am able to get tikz graphics using knitr working with math mode as in this post: Math mode in knitr ...
2
votes
0answers
273 views

To get this WordCloud and R working in OSX's Texpad -1.6.0

I am trying to this Hamilton's code about WordCloud, which uses R, working in OSX. I have latest XCode and latest R 3.1.1 (XCode5 support) installed. Texpad 1.4.7-1.6.0 problem I open TexPad with ...
5
votes
1answer
150 views

Can you specify a word separator for variables in listings?

Depending on the language specified, the listings package may or may not bold keywords inside of variable names. Python is fine \documentclass{article} \usepackage{listings} \begin{document} ...
2
votes
1answer
229 views

row and column specifications in xtable output

Using xtable I am trying to format a table x<- 1:5 y<- 11:15 mytable <- table(x,y) print(xtable(mytable)) Which gives I want to add x and y tag also at the top of the rows and sides