2
votes
0answers
43 views

TikzDictionary slow and blocking in knitr

I need to knit presentations with many slides and Tikz-plots. Knitr is fantastic for this, but it takes very long time and I cant knit two reports in parallel. I have isolated the problem to the ...
2
votes
1answer
14 views

Howto: Set up knitr (*.Rnw compilation) from in TexStudio

How do I set up TeXstudio to compile xxx.Rnw files? I am using the TeX-Editor TeXstudio 2.7, on Windows 7, and R 3.01 64-bit. I would like to write a xxx.Rnw-file in TeXstudio and then from ...
0
votes
0answers
31 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 ...
4
votes
0answers
102 views

Best Practice for nice layout with tikzDevice

R+tikDevice+LaTex+knitr is (as I understand it) the most efficient way to get relly nice looking publications from R, with maximum layout-support from LaTeX. I'm using R+LaTex+knitr now, but would ...
3
votes
0answers
19 views

inline knitr code that isn't a simple number

It is easy enough to do something like \Sexpr{1 + 1}. But how can I do \Sexpr{mymatrix} with mymatrix being a matrix object in R workspace? More generally, how can I print object that is more complex ...
0
votes
0answers
24 views

Can I produce a .tex file from .Rnw?

Before I sink all of my work into .Rnw format, I hope to know whether it is possible to produce .tex files? I know that I can knit .Rtex file to produce .tex, however Rstudio does not support .Rtex ...
7
votes
4answers
112 views

tikz has probably problems with czech babel when compiling .Rnw

Problem Tikz seems to have a problem with \usepackage[czech]{babel}. I had a moderately big .Rnw document written in czech with some plots via knitr chunks. When I set dev = 'tikz' the TeXmaker ...
2
votes
1answer
88 views

Controlling formatting options for xtable

All, I'm a LaTex/knitr/Sweave amateur and have had trouble finding answers to what seem like they should be fairly simple questions online. I have a .Rnw script that I am currently compiling to PDF ...
0
votes
0answers
30 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
44 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 ...
4
votes
0answers
49 views

passing a String from an R Script to .Rnw template R code section ,brew/knitr

this is my first ever post and i am quite new to all of this, so i hope i am doing this right. my problem is the following: i wrote some R code to get some ID's from a Database, which are then used ...
3
votes
2answers
173 views

Suppress library comments from ouput with knitr

I noticed that some library comment manage to pass through the knitr options, with R 3.0.1 and knitr 1.5 running on Mac OSX 10.8.5. The following MWE \documentclass{article} \begin{document} ...
2
votes
1answer
93 views

How to loop over R objects OUT OF chunks

I want to typeset with TeX a report based on data from an R object (dataframe). The idea is to print a nice TeX table from each line of a R dataframe. Something like \begin{tabular}{ l c r } A1 ...
5
votes
0answers
171 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 ...
6
votes
1answer
157 views

Is it possible to get Sweave/knitr in RStudio to output the .tex file without typesetting it?

I would like to know if it is possible to tell Sweave or knitr in RStudio to create the .tex file without trying to typeset it. I want to be able to run my .Rnw file and produce a .tex file which I ...
0
votes
0answers
80 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 ...
3
votes
0answers
232 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
53 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 ...
3
votes
0answers
77 views

Fontsize with knitr & tikzDevice

I saw there are already a couple of questions on the argument (here and here) but since they are a few months old and since I can't manage to make the option dev.args=list(pointsize=5) works even ...
4
votes
0answers
88 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 ...
0
votes
0answers
28 views

How to prevent plots being printed out of document's sections? [duplicate]

I am preparing a document using knitr in which I have multiple charts within two or more sections. The majority of the plots is printed at the end of the document but I would like them to stay within ...
2
votes
1answer
309 views

passing a variable from R to Tex in knitr

I am sure this has been asked multiple times since it seems to be a common issue. I looked around but all I could find was the \Sexpr for sweave which does what I want. I am using knitr and I can't ...
2
votes
1answer
587 views

knitr xtable make two tables equal width

I am using knitr and xtables to automate a report procedure. I want to include a few tables in this report and make them displayed with equal width. The Rnw code is listed below. Anyone could tell me ...
2
votes
1answer
98 views

knitr compiling time with large datasets

I noticed that with a large dataset knitr takes an unexpected long time to compile my document: about 23 minutes from when knitr completes the last chunk to when it writes the .tex. I don't understand ...
2
votes
1answer
129 views

siunitx error: “invalid-number” from R

I have a document in .Rnw which I use to produce a .texdocument with kntir. I have a problem with the formula \num{\Sexpr{max(degree)}} which in R console produce 12598 but after the running knitr in ...
5
votes
1answer
222 views

knitr and font style consistency in graphics

I am starting to use knitr to print graphics from R in my document. So far what I have been doing (I don't know if this is the best approach, but it is working) is to load the my R workspace with ...
3
votes
1answer
182 views

how to keep position of rotated tables

Since I'm working with R, I'm using the xtable package to produce my tables in Latex. Some of the tables only fit the page if rotated. It seems that sidewaystable always starts a new page. My problem ...
5
votes
1answer
449 views

How to build Knitr document from the command line

I would like to compile a knitr document from the command line. With Sweave, the sequence R CMD Sweave my_sweave_file.Rnw latex my_sweave_file.tex latex my_sweave_file.tex dvips my_sweave_file.dvi ...
6
votes
1answer
494 views

Building TeX file from knitr Rnw as child of larger parent TeX file to use R objects and output

Here's my general 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 multiple chapters as ...
1
vote
0answers
81 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 ...
2
votes
1answer
278 views

insert figure in sweave using knitr fig.path

I'm trying to insert a figure using Sweave which is located in the path C:\Users\eccehomo\Documents\mi\fig1.png. I'm using the package knitrwhich has a function called fig.pathbut I'm getting many ...
4
votes
1answer
327 views

Using Greek letters in LaTeX tables

I have the following Rnw document which I intend should produce a small table with "a b c" and "α β γ". At the moment, the encoding seems to be causing problems. The funny thing is that the output in ...
4
votes
1answer
700 views

knitr problem after update to R 3.0.0

I just updated R to 3.0.0. I couldn't compile PDF from my .Rnw file, which I could do with R 2.15. Here is the error I got: ! Undefined control sequence. l.192 \SweaveOpts ...
7
votes
2answers
656 views

tikzDevice is not getting sizes right (knitr)

I am using OSX, pdflatex, R (cran), tikz/tikzDevice and knitr to create my documents. My problem is that the font sizes of the produced tikZ-file do not match the LaTeX document font sizes. Result / ...
2
votes
0answers
103 views

Long and rescaled xtable [duplicate]

Is there a way to use scalebox along with tabular.environment='longtable' when printing a long and wide xtable? When I give both of them I get an error: Running xelatex.exe on my_file.tex...failed
6
votes
2answers
1k views

R-code linebreaks AND code highlighting in knitr

I used the great answer from @Sharpie on 19 Jan 2012 Getting Sweave code chunks to stay inside page margins? to get linebreaks in the R-code, but how can there be code highlighting (colors) too? ...
1
vote
0answers
177 views

knitr : Figure are not appearing at the correct place [duplicate]

I'm trying to use knitr while learning LaTeX but all my figures are placed at a seemingly random place. It's driving me insane. Any ideas? Example Input PDF Output I tried reinstalling TeX Live ...
2
votes
0answers
102 views

Highlight R chunks in a Knitr document when working in Kile

When working on a knitr document in kile I can get highlights for the LaTeX parts of the document by adding the *.Rnw file extension in the Modes & Filetypes tab under Open/save configuration ...
3
votes
1answer
341 views

How use LaTeX counters to label knitr code chunks?

Imagine one has the LaTeX environments Example and Solution defined from the theorem environment. I have several Examples in numerous child documents which make up a book. LaTeX will automagically ...
2
votes
1answer
306 views

Adding a knitr table from R into a \pgfplotstableread statement

I'm trying to get a table from R into a pgfplotstable to edit for printing. the r code is \documentclass{article} \usepackage{pgfplotstable} \begin{document} \pgfplotstableread[format=inline,row ...
4
votes
1answer
222 views

Align Numeric Values from knitr command \Sexpr{} by Decimal in Table

How can I align numeric values brought in from the knitr command \Sexpr{} by decimal in a table?
2
votes
1answer
463 views

Program Tikz in Beamer

The attached .Rnw-code produces two similar slides, but with different texts and different arrow positions. I wrote both slides manually, but because I need to produce hundreds of similar slides, I ...
7
votes
4answers
1k views

knitr and biblatex

I'd like to create a PDF report with knitr with LaTeX-code in RStudio with biblatex for citations. However, the in-text-citations are always undefined and no bibliography is printed. The same ...
0
votes
1answer
123 views

Question mark in knitr code getting quote marks [closed]

I'm trying to use question marks in a code block using knitr, but in the compiled pdf always puts quotes around it, so, for example <<helpCode, eval=FALSE>>= ?rnorm @ comes out as ...
9
votes
1answer
1k views

R+LaTex to HTML5 better than pdf?

I use R together with ggmap, ggplot2, Rstudio, knitr, and beamer to produce presentations in pdf. Soon I hope to have time to learn TikZ too. I have not moved to Markdown because I appreciate the ...