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.

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

How to Integrate R code in TeXStudio?

I am writing my thesis in TeXStudio. One chapter features plots / analysis etc. that I am writing in a markdown in RStudio. Is there a way to kinda "link" the documents so the output from R is ...
1
vote
0answers
79 views

Compilation problem with fontenc-Latex - LaTeX2e problem

Unfortunately, I am experiencing the same issue as reported in Compilation problem fontenc-Latex. I reinstalled my TeX installation and ran tlmgr update, all to no avail. I am using RStudio Version 1....
0
votes
0answers
29 views

Texlive in windows 10 does not find .sty

Because of the limited setup in my work, I use RStudio to write LaTeX in a windows machine. I have sucessfully installed TexLive, and I can compile basic TeX. However, I want to use amsmath package. I ...
1
vote
1answer
42 views

How to customize header with Rmarkdown?

I'm currently working on a pdf document using Rmarkdown on RStudio but I'm very much confused about to how to customize my YAML section. This is my actual code: --- title: "The very basics of R" ...
2
votes
1answer
85 views

Can't fit a table in beamer

This is the output of the stargazer package that I did in R. However, I can't make the table fit in my beamer presentation. Here is the code: % Table created by stargazer v.5.2.2 by Marek Hlavac, ...
0
votes
0answers
68 views

Issue with fig=TRUE in Sweave RStudio

I do not receive plots using the fig=TRUE in the chunks. Rather i receive an 'undefined control sequence' error. Consider a simple code \documentclass{article} \usepackage{graphicx} \begin{document} ...
0
votes
0answers
12 views

RStudio knits weave and miklatex/mactex

which is the best place to start for a newbie latex with rstudio and sweave/knitr i need to make mathematical calculations and simple plots of sales over time
0
votes
1answer
145 views

Paragraphs won't indent

I'm issuing rstudio and bookdown to cross-compile rmarkdown to TeX and make a PDF for my dissertation. I've got everything formatted how I need it, but I'd like an indent to start each of my ...
1
vote
1answer
85 views

Remove brackets around special characters in URL in bibliography entries

I am creating a pdf book in RStudio using bookdown with natbib, and cite with [@reference] from a .bib file created with mendeley. Also, I use the \setcitestyle{numbers,square,comma} style. For all ...
0
votes
0answers
81 views

Including R code in latex

I have some problems by inverting my R code into latex and than copying the code of the pdf back into R. I used lstlistning to read the R code and since it did not show the -, I used this code: \...
2
votes
0answers
1k views

Error running C:/MIKTEX~1.9/miktex/bin/x64/pdflatex.exe (exit code 1)

I'm using latex in rstudio and when I try to compile pdf I get this mensage: Error running C:/MIKTEX~1.9/miktex/bin/x64/pdflatex.exe (exit code 1) How can I solve this problem? I'm desperate, I'm ...
0
votes
0answers
224 views

BibTex stops working with Sweave in RStudio

I'm trying to compile an .Rnw file using Sweave in RStudio (V. 1.2.1335) but every time I use citations / bibliography I get the following error: If I don't use citations, everything compiles just ...
1
vote
1answer
105 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
474 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 ...
5
votes
1answer
1k 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
26 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, ...
3
votes
1answer
716 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? ...
2
votes
1answer
976 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
50 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
72 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
155 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
338 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
544 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
9k 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
4k 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
564 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
667 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
1k 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
1k 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
635 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
63 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
674 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
391 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
125 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
721 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
2k 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
495 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
614 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
1k 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
2k 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{...
1
vote
1answer
4k 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
797 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
780 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
573 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 ...
3
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
602 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
522 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
995 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
205 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/...