dynamic report generation with R.
1
vote
1answer
49 views
Cairo font size in Knitr
I am trying to set the font size in a Cairo device, but the pointsize argument seems to set the size of the points in the plot, and not the font size. I have this MWE:
\documentclass{article}
...
3
votes
0answers
74 views
Beamer (with style) to Html5?
My organization require the use of a standardized powerpoint template for how slides should look, so I've written my own Beamer .sty (style file).
Then I write .Rnw-files in RStudio that I knit ...
2
votes
1answer
52 views
Create pdf with subset of slides
I use knitr and RStudio with XeLaTeX to create a presentation with many slides. But sometimes not all of the slides should appear in the final pdf. Is it possible to have a variable that I change ...
2
votes
1answer
53 views
Finding the current position on the PDF
I am trying to generate automated reports in R using knitr. There are a list of objects I need to print on the PDF and the size (rows, columns, length etc.) can vary. The problem is that when any of ...
0
votes
1answer
71 views
Using knitr, how can I rotate page to landscape and fit the figure to full extent?
LaTeX newbie here, so please be gentle.
I'm working with knitr to generate pdf report. The document consists of quite few large maps, with a lot of details or small multiples. Ideally, whenever such ...
4
votes
1answer
103 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 ...
2
votes
1answer
47 views
Math mode in knitr
How do one use a math-mode in knitr? For example as a label for X-Y axis:
<<fe, echo=FALSE, sanitize=TRUE, dev="tikz">>=
plot(1:10, main="${}^{57}Fe$", xlab="$\\\\lambda$", ...
3
votes
1answer
212 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
...
3
votes
1answer
83 views
Knitr and tikzDevice not working together with article options
I have a problem with knitr and tikzDevice, like someone before me. (See tikzDevice is not getting sizes right (knitr) .) He used dev.args to get rid of this error, but if I run this code through ...
6
votes
2answers
177 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
62 views
Long and rescaled xtable
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
1
vote
1answer
117 views
knitr how to label and call a figure number in a text
As a knitr beginner I don't know how to label a figure and call it.
For my first figure I've tried the following code witouth succes...
<<fig.cap="Dendrogram of GDP ...
5
votes
2answers
179 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?
...
3
votes
2answers
112 views
Force paragraph to stay with previous
I am using knitr to create inline sparkline-esque graphics. However, when knitr inserts images that it generates with R, it add a blank line, which forces LaTeX to make a new paragraph.
That is, if I ...
1
vote
0answers
164 views
knitr : Figure are not appearing at the correct place
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
67 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 ...
2
votes
1answer
108 views
Show knitr-RNW document structure in Kile
When working with a knitr file (RNW document) on Kile the document structure isn't shown in the structure view, even though it contains a valid LaTeX structure of parts, sections etc. If I change the ...
3
votes
1answer
122 views
knit with `pdflatex --shell-escape myfile.tex`?
I want to insert a word count into my .Rnw file.
To do this, I have the following line in myfile.Rnw:
\makeatletter\@@input|"echo `texcount -1 myfile.tex`| cut -c1-4"\makeatother
But this requires ...
2
votes
1answer
90 views
How to remove the blank page when omitting comments and messages in knitr
I am using the following code to create a plot, I want to omit message, comments and warnings and everything else but the plot.
\documentclass{article}
\usepackage{pdflscape}
\pagestyle{empty}
...
3
votes
1answer
180 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 ...
5
votes
2answers
477 views
Vertical aligning text and vertical height of rows in longtable environment
I have now been working on fixing this problem for some time and I have read through some forums on the Internet and tried different things, but I can't solve this problem.
I am looking to have some ...
3
votes
1answer
106 views
Setting Knitr options
The following code chunk doesn't work I get an error message and it disrupts the compilation of my document. Not sure if anyone has any ideas? Very M WE below. As @Speravir pointed out, not sure it ...
2
votes
1answer
266 views
knitr with TeXworks
There is a great piece on Yihui's site about using knitr with TeXShop. Taking some time for some self indulgent curiosity here. Is there a way to use knitr as an engine in TeXworks?
2
votes
0answers
96 views
Pgfplotstable converting zeros to — in a knitr inline table
how do I change each 0.0 to -- without having to reference each as string type or making the whole table string type? The actual table is quite long and it would take too long to do it manually. For ...
10
votes
1answer
298 views
Two column layout with text and knitr chunk
When making presentations (with latex beamer class), I often go for a frame layout with text and equations on the left and a corresponding figure on the right. My standard solution has been to wrap ...
2
votes
1answer
198 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
137 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
267 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 ...
1
vote
0answers
74 views
LaTeX figure cross reference label using RStudio and knitr [duplicate]
Possible Duplicate:
Why does an environment’s label have to appear after the caption?
Where to put the \label on a figure environment?
When using RStudio to write a .Rnw file, I find that ...
1
vote
1answer
424 views
Sweave and Matrix
I am using xtable to generate Matrices
x1mean <- matrix(c(204.5, 556.5), 2)
x2mean <- matrix(c(130.0, 355.0), 2)
x1mmat <- xtable(x1mean, align = rep( "", ncol(x1mean) + 1) )
x2mmat <- ...
6
votes
3answers
569 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 ...
7
votes
1answer
418 views
Command already defined
I came across an odd problem compiling LaTeX exam.cls document producing with knitr. Pasted below is minimal reproducible code.
knitr compiles fine, but pdflatex terminated with:
Command \framed ...
0
votes
1answer
76 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
...
0
votes
1answer
370 views
Looping a code-chunk in LaTeX
I want to generate a report for three types of analysis I am performing. But each time when I perform the analysis it can happen that one or more than one type of analysis occur. I want to put ...
8
votes
1answer
911 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 ...
2
votes
1answer
196 views
Rstudio output in Hebrew
(Follow-up to
Making LaTeX documents with Hebrew? (in Sweave + RStudio))
Trying to reproduce the above answer, I followed these instructions without success, under Windows 7.
The best result I got ...
2
votes
1answer
188 views
Command that gobbles all following empty lines
One distinction between knitr and Sweave is that the former forcibly inserts two empty lines in the generated TeX source for chunks that do not do any output.
I'm not sure if this issue is a bug or a ...
2
votes
1answer
262 views
How can I have subfloats with knitr in LyX?
I have two knitr chunks in LyX that work fine by themselves in their separate floats (this post applies to both figures and tables). But when I try to put them in as subfloats (by selecting both and ...
1
vote
1answer
198 views
How do I reference an object inline in LyX that is in a knitr chunk?
Suppose I have an object that was processed in an earlier knitr chunk, say
my_df <- read.dta('somefile.dta')
x <- mean(my_df$age)
Putting an inline knitr chunk does not work -- the knitr ...