Questions tagged [rstudio]

RStudio is an IDE for working with the programming language R. It also has in-built functionality for compiling .Rnw files to .tex files and then directly to .pdf files. It can be set up to process the .Rnw file with either Sweave or knitr.

1
vote
0answers
24 views

TikZ picture not rendering in different environment

I successfully constructed a TikZ diagram with the following code \documentclass{article} \usepackage{tikz} \usetikzlibrary{automata, positioning, arrows, shapes} \begin{document} \tikzset{...
0
votes
1answer
61 views

Is there a way to make LaTex show up in RStudio preview?

I'm using RStudio (current version) on a Windows 10. The math rendering works but when I add additional aspects to make the document more clean, I run into the problem of going from pdf to html and ...
4
votes
1answer
294 views

How to insert references and bibliography into a .Rnw file produce with RStudio R Sweave and knitr?

So far, I have successfully used RStudio and R Markdown to write scientific papers and insert citations from the medical literature without significant problem as shown in the minimal example (MWE) ...
0
votes
0answers
21 views

Xtable_AreaUnderCurve values

New at Latex I need to make a table in Latex with the AUC (area under curve)values and AUC-IC interval of some variables. How can I combine RStudio functions as the one of the pROC library o similar, ...
2
votes
1answer
390 views

Math mode in document title with R Markdown

I was trying to put $\LaTeX$ in the document title but can't find a way to do so. I suppose that this is because I can't use latex packages with the document title. Does anyone know how to solve this? ...
1
vote
1answer
205 views

How to make vector arrows?

I would like to make a vector over my beta symbol. What I use for the moment is: $A\overrightarrow{\beta}$ I have also tried the following: $A\vv{\beta}$ $A\vec{\beta}$ Note that all of these ...
0
votes
1answer
35 views

Sweave child rnw losing formatting

I have managed to get a master.rnw include a child.rnw, however, I can maintain the formatting of the child document based on the preamble in the master. Master.Rnw \documentclass[11pt,a4paper, ...
1
vote
0answers
44 views

Greeks Letter in RStudio + Sweave

This is my Rsweave reproducible code: \documentclass{article} \usepackage[a4paper,left=1.5cm,right=1.5cm,bottom=1cm,top=3cm]{geometry} \usepackage[perpage]{footmisc} \usepackage{csquotes} \...
1
vote
0answers
90 views

Problem with out of KableExtra tables with LATEX in Rstudio: paste0 function

This is my Rsweave reproducible example: \documentclass{article} \DeclareUnicodeCharacter{3B1}{$\alpha$} \DeclareUnicodeCharacter{3C4}{$\tau$} \DeclareUnicodeCharacter{3C3}{$\sigma$} \...
1
vote
1answer
199 views

Bibliography output in RStudio with multiple references

From this link I was able to replicate the references result. https://texblog.org/2013/08/20/rknitr-automatic-bibliography-generation-with-biblatex-in-rstudio/ How can I add more than one output? ...
0
votes
1answer
323 views

Loading Custom Fonts into RMarkdown

I've been testing loading my own fonts into a personal rmarkdown document using the fontspec latex package. Because I'll eventually need to knit this on a server, using the font library on my mac is ...
3
votes
1answer
4k views

RStudio not detecting MikTeX

I am having some trouble using MikTeX (v2.9) on windows 7 (64 bit) with RStudio (v1.1.447; R v 3.5.0). Despite the fact that I have installed the complete MikTeX, RStudio keeps telling me that no ...
1
vote
1answer
2k views

Minimal LaTeX install for knitr to export PDFs from Rmarkdown on Debian-based system

I use RStudio and started writing Rmarkdown documents to knit them into HTML pages and PDFs. I tried installing TexLive but it failed when the astounding number of packages filled my limited ...
1
vote
0answers
408 views

RStudio, pdflatex fail on .tex file [closed]

I have compiled many .pdfs and knit many .Rnws and .Rmd files in the past with this computer. Not sure what changed, but I now get a message stating: Running pdflatex.exe on [doc_name].tex...failed ...
2
votes
1answer
427 views

RStudio regression table into beamer slide

I have a very basic Rstudio regression output table inputing in Latex issue. I get an error message pointing me to the end of the frame part, after the table and I can't see what's wrong. Here is the ...
0
votes
0answers
863 views

RStudio - File not found error, but file exists

I just completed installing MiKTeX 2.9 on my work laptop so that I can using it with RStudio v1.0.153. I'm run just the default R Notebook file that you get when you select New >> R Notebook. After I ...
2
votes
2answers
761 views

Is it possible to use the LaTeX citation command “\cite{key}” when using knitr in Rstudio?

I've been looking for a way to use the \cite{AuthorYear} or \citep{AuthorYear} command on my markdown document on Rstudio instead of the [@AuthorYear], but have not managed to find any solutions here. ...
1
vote
1answer
479 views

R code and Sweave output - EDIT

UPDATED Question 1 In the lattest update of KnitR the output is clean as what I expected. Maybe an update was made. The new output : Before update I'm trying to get a particular output with Sweave ...
0
votes
0answers
58 views

How to get tables to appear in the top section instead of a list of tables?

I'm writing a paper in IEEEtran format using RStudio and rticles (ieee_article format). When I insert the first table in the document via a new block LaTeX (MarkDown tables do not get converted to ...
0
votes
1answer
421 views

Trying to get rid of the included chunk in sweave document.

I just translated the mosaic manuals and I'm giving format to them. I'm using this chunk for all the packages, but it's still printing me the whole chunk at the first page of the book: <<...
0
votes
0answers
344 views

How can I preview the output of a RNW file?

I currently create pdfs in RStudio by calling the knit2pdf function on a RNW file. However, when playing around with the LaTeX formatting in the RNW file, I'm wondering how I can preview my results? ...
1
vote
0answers
101 views

Request: LaTeX packages supported by knitr+RStudio [closed]

Question: Is there a list anywhere of R packages which work with knitr+RStudio? (Note: I already changed RStudio's defaults to use xeLaTeX and knitr instead of PDFLaTeX and Sweave, since my default ...
2
votes
0answers
582 views

RStudio on mac unable to locate pdflatex (within its global environment variables folder) for converting .Rmd into .pdf [closed]

I want to convert .Rmd files to .pdf in RStudio 3.3.2 on a Mac OS Sierra. RStudio requires packages from the LaTeX distribution for the same viz., pdflatex. I believe BasicTeX (220 Mb) is a lighter ...
2
votes
2answers
1k views

Generate Table with Greek letters and multicolumns in rstudio for latex

With the commands: --- output: pdf_document --- ```{r, results='asis',message=FALSE,warning=FALSE} library(knitr) library(xtable) url <- 'https://cdn.rawgit.com/fsbmat/StackOverflow/master/' ...
3
votes
1answer
368 views

Problem with foreign characters: some work (äöüßĐØ), some not (ČĈĐĎŸ) [RStudio+knitr+XeLaTex]

I want to print some foreign characters in my final PDF produced with RStudio (0.99) + *.Rnw-File with knitr + XeLaTex (via Miktex). While using XeLaTex and polyglossia I can manage that all foreign ...
2
votes
1answer
517 views

Generated Greek letters in plots using the tikzDevice package

With the code below I create in Rstudio the file gamma0plot.tex. Then in TexNicCenter in the figure environment with the input command I load the file gamma0plot.tex and generate a .pdf file. In This ....
1
vote
1answer
836 views

Can't get images to work with .Rnw files on RStudio

I've been trying to debug a .Rnw file I wrote in RStudio for about a week now. The most frustrating part is that it used to work perfectly in its current form but then seemed to inexplicably stop ...
0
votes
1answer
1k views

Is it possible to have a latex algorithm inside an R markdown file?

I'm trying to use the following inside an R Markdown file (.Rmd): \documentclass{article} \usepackage[linesnumbered,lined,boxed,commentsnumbered]{algorithm2e} \begin{document} \SweaveOpts{...
0
votes
1answer
3k views

unable to run 'pdflatex' on 'myFirstAlignment.tex' in rStudio

Getting this Error Message: Error in texi2dvi(texfile, quiet = !verbose, pdf = identical(output, "pdf"), : unable to run 'pdflatex' on 'myFirstAlignment.tex' In addition: Warning message: running ...
0
votes
2answers
547 views

How to use \newcommand to define renewed command with two arguments?

I defined a new command as \newcommand{\code}[1]{\texttt{#1}} Then, I redefined \texttt, so to make it still work, I "stored" the command first and changed the way I define \code, so it can still ...
0
votes
1answer
592 views

Creating a PDF output using Latex and R-Markdown… keep getting an error

I have a file I'm working on in R-Studio, and it was working really well (have about two pages worth of output that does work). But when I try to add to it with a new table, I keep getting: > "...
0
votes
2answers
403 views

R Sweave not interpreted correctly due to writing style?

This case won't get correctly interpreted. I doubt it must be to do something with my writing style but I cannot notice what it is. You can run it with R CMD Sweave Test.Rnw; pdflatex Test.tex ...
2
votes
1answer
2k views

Unable to add frame numbers to beamer when using Rmarkdown

I write many documents using RStudio, including beamer slides from both LaTeX (Sweave/rnw) and Rmarkdown (rmd). I understand that \setbeamertemplate{footline}[frame number] will add frame numbers to ...
2
votes
1answer
2k views

Installing a Subset of MiKTeX Packages to use RStudio knitr PDF Compiler

I would like to compile an R Markdown document using the knitr package in Rstudio on a Windows 7 OS using MiKTeX. RStudio recommends the complete installation of MiKTeX, this encompasses over 3,167 ...
1
vote
1answer
512 views

LaTex and R-Studio: Change color of R-Code [closed]

Good afternoon I have a question concerning the use of LaTeX and R-Studio. Since hours I'm trying to produce R-Code (Input) in blue color and create the belonging R-Code (Output) in the black color....
0
votes
1answer
389 views

Perfect Image size for the textwidth [closed]

I am exporting some R Studio data manually as a figure by the graphicx package into my document(\documentclass[a4paper,11pt]{report}). As I scale my graphics or set their size to textwidth, they ...
1
vote
1answer
850 views

knitR, XeLaTeX and tikz in RStudio: fails to compile

I try to use knitr, tikz and xelatex in RStudio. Minimum Example: %-*- program: xelatex -*- % !Rnw weave = knitr \documentclass{article} \usepackage[a4paper]{geometry} \usepackage{fontspec} \...
1
vote
0answers
173 views

Epstopdf package not working with XeLaTeX in knitr ONLY

Background I regularly use knitr in RStudio to typeset LaTeX documents using XeLaTeX with R chunks in them. This had worked fine up until this morning when RStudio stopped recognising that MiKTeX/...
3
votes
1answer
171 views

No increment of a variable in a Sweave code chunk which is wrapped by a \whiledo loop

I already searched in different forums but until now I couldn’t find a solution. So I hope that you can help me… Like mentioned in the title there is no increment of my variable x in the code chunk ...
3
votes
2answers
3k views

Tables with reference to R objects in sweave / latex

I'm using knitr/R-sweave to produce a pdf-document wit LaTeX-code. I want to make a table with some numbers produced by some R calculations in the R-code-chuck above this table. When I usually want to ...
1
vote
1answer
634 views

Caption options don't work in rmarkdown beamer template

I want to resize the figure captions in an rmarkdown beamer template, so I added \usepackage[font={small,it}]{caption} to my header.tex. But it doesn't work - the options are ignored. I didn't find ...
1
vote
0answers
229 views

No bibliography output [closed]

Code \usepackage{babelbib} ... \nocite{*} \bibliographystyle{plain} \bibliography{LV} I'm getting no output (bibliography). Installing the bibtex dependencies again for tex-live with no results. ...
1
vote
1answer
459 views

with rmarkdown tufte-handout template xtables placed at the document end

I cannot understand why the chunks in rmarkdown would place tables at the end of the document. If I allow ECHO = TRUE in the chunk header, the code gets output in the correct place, but the table (...
3
votes
1answer
2k views

Error message using pdflatex on “R's Multiple Sequence Alignment” Package

I am new to using R-studio and the Multiple Sequence Alignment package. I am trying to generate a PDF of the outputs from an alignment result, but I keep getting an error message. I am inputting ...
1
vote
0answers
51 views

Special Roman/Japanese Encoding with RStudio Sweave

Is there a way for having multiple enconding support in RStudio Sweave? I have the following citation, and using different encodings like uft8 or cjk just results in errors. Reference METI. (...
2
votes
1answer
920 views

Using Calibri with a Mac

I am preparing a document, writing it in RStudio and knitr in a Mac (OS X El Capitan 10.11.2). I would like to use Calibri (to mimic Office documents). I already have a legal version of Microsoft ...
0
votes
1answer
1k views

Knitr markdown can't display basic symbols

I'm on Ubuntu 14.04, running RStudio Version 0.99.473. I have LaTeX installed (TeXworks) and knitting Rmarkdown documents works just fine. However, adding mathematical symbols such as $\mu$ causes it ...
0
votes
0answers
2k views

Encoding error when knitr -> LaTeX -> PDF

I have a document written in knitr. I can export it to HTML and docx, but not PDF for some reason. The Rmd file is here http://cl.ly/dJka?_ga=1.30252732.2076817589.1442770201 It says ! Package ...
1
vote
1answer
1k views

knitr creating a wrong second “#” in a deep hyperlink

I would like to compile a .Rnw Document in RStudio with knitr that includes a "#" in the hyperlink (deeplink) of a float caption. See the minimum working example: (compiled with R Studio Version 0....
1
vote
0answers
470 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 \listoffigures{"...