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
0 answers
25 views

Using CJK adaption code in R Markdown

I have limited TeX experience, so please forgive the simple question. I've tried to resolve this issue for hours to no avail. I am trying to use the code for CJK Chicago-style author-date ...
myusername's user avatar
1 vote
0 answers
47 views

Compiling error with R plots

I appreciate your advice in advance. The following code worked around two years ago and it stopped working after I updated TexLive, and R to the latest version. The error message is Paragraph ended ...
user3084501's user avatar
0 votes
1 answer
192 views

Tufte-style book with ConTeXt

Is there any tufte-style formatting in ConTeXt as a module? I have seen references to \usemodule[tufte] in some documents but I can't find how to use this module in ConTeXt garden site. I'm using ...
Juan Riera's user avatar
1 vote
1 answer
68 views

asymptote in RStudio

Recently, I found an amazing fact: if we go the art of problem solving website, with copy and paste to .Rmd in RStudio, we could directly have the latex codes for math equations. That is very nice. ...
Pai's user avatar
  • 11
0 votes
2 answers
79 views

RStudio not exporting while TeXworks does

Problem Overview I want to use the cancel-package for my R-Markdown-file project.rmd. For that, I created a preamble.tex-file with following content: \usepackage{amsmath} \usepackage[makeroom]{cancel} ...
Taxifahrer's user avatar
0 votes
0 answers
244 views

Problem Solved - Multiple issues with Sweave and Knitr

Here is the Github link of the files and a short description of the issues: https://github.com/Euniceisnice/What-is-wrong-with-my-Tex-and-Sweave I have never managed to compile my Rnw file with Knitr. ...
Eunice Ng's user avatar
0 votes
0 answers
217 views

Copy/Paste from R Studio to TeXStudio: Newlines and UTF-8 Issues

I am seeing a difference of behavior from my Mac to my Linux machine in copy/paste from R Studio to TeXStudio. I am executing R commands in R Studio, and then I want to copy the output into TeXStudio. ...
Adrian Keister's user avatar
1 vote
0 answers
22 views

How do I assign these variables from Rmarkdown? [duplicate]

I have variables that are going to be dynamic in this document. How do I assign theme from Rmarkdown. Below is how my .tex file looks like So for example $District_Name$ is a dynamic variable. I want ...
bob0901's user avatar
  • 13
1 vote
0 answers
2k views

Cannot fix: ! LaTeX Error: File `pdflscape.sty' not found

I am using tinytex, Windows 10, R Studio install.packages("tinytex") tinytex::install_tinytex() and keep seeing the following error when I try to run a .Rmd file which contains \usepackage{...
Elis's user avatar
  • 11
2 votes
1 answer
306 views

Change the style of chapters (sections) of the .pdf document from rstudio with knitr package LATEX "titlesec"

I try to style the chapters (sections) of an article document (documentclass: article) using the latex titlesec package, but I don't get any results, I mean that when I configure the document there is ...
José Carlos's user avatar
0 votes
0 answers
2k views

Compile pdf in R Studio fails

I am struggling for three days now with the following issue and it's driving me crazy: I am trying to use the "compile pdf" in knitr (R Studio) to compile a basic .rnw file: \documentclass{...
Ermi Atha's user avatar
1 vote
1 answer
678 views

Export regression in R to Latex - decimal alignment

I did regressions in R using the lm function. Afterwards, I want to export it to Latex with the following code. #export to Latex texreg(list(model_cont,model_mag,model_pos), digits = 4, ...
user249426's user avatar
0 votes
0 answers
98 views

TeXstudio and RStudio do not see tufte-book.cls but TeXshop does

\documentclass{tufte-book} \title{title} \author{me} \begin{document} \maketitle \end{document} TeXstudio and Rstudio complain File `tufte-book.cls' not found TeXstudio log This is pdfTeX, Version ...
mk9y's user avatar
  • 299
0 votes
1 answer
742 views

Manually numbering with \tag in double dollar signs

I want to manually numbering in non-numbered displayed equation environment and try the following steps \documentclass{article} \usepackage{amsmath} \begin{document} \[ \bar{D}=\frac{1}{n} \sum_{j=1}^...
John Stone's user avatar
1 vote
1 answer
416 views

fonts not working in pdf output with bookdown in RStudio

I am using bookdown in the Rstudio environment to produce a pdf book. This is running on Ubuntu 21.04, with the latest version of RStudio, R 4.0.4, and new installs of texlive and tinytex. I am using ...
bshor's user avatar
  • 277
1 vote
1 answer
603 views

!pdfTeX error: pdflatex (file t1-zi4r-0): Font t1-zi4r-0 at 540 not found

My issue is same as this problem Error: Font ts1-zi4r at 540 not found In my case, I am running Rstudio server on a remote machine for work. When trying to build the vignette/manual pdf I get this ...
sutsabs's user avatar
  • 111
0 votes
0 answers
84 views

Is there a way to automatically use minty for all code blocks?

I have been given a book in RMarkdown format and I am compiling it to pdf using RStudio. I want to use minted for the many code blocks included in the book. It works fine but I would like to apply a ...
Dionysis's user avatar
  • 115
0 votes
1 answer
143 views

Centering a table that is too big [duplicate]

I know that there are already similar questions to this on stack exchange, but I am working in R studio with the Stargazer library and I want to be able to directly copy and paste my tables into ...
Sparkles the unicorn's user avatar
0 votes
1 answer
74 views

Using Memoir class with RMarkdown fails when trying to generate the table of contents

I am using RMarkdown in RStudio to compile a book written in Markdown. I am using the memoir class and it all works fine as long as I set toc: false. When I try to compile with toc I get the followin ...
Dionysis's user avatar
  • 115
1 vote
0 answers
1k views

RStudio, pdflatex fails to knit to pdf and crashes

I'm trying to compile a simple Rnw file in RStudio using knitr's "compile pdf" functionality. But it gives me an error. This is what I have in Vorlage.Rnw: \begin{document} Hello World \...
Kris's user avatar
  • 11
1 vote
1 answer
937 views

Help rendering booktabs tables in RStudio

Can I use the booktabs package in R? I am using RStudio and could not find a way to install a version of the booktabs package. The table I am trying to render in a .Rmd file is provided below: %----- ...
Ovande Furtado's user avatar
1 vote
1 answer
760 views

Including images in an R code chunk of R sweave using for loop

I am new to sweave and Latex. I am basically using an if-else loop which should display some specific image (taken from the laptop) if certain condition is satisfied. When I run this loop in R, the ...
radhika's user avatar
  • 23
1 vote
1 answer
155 views

Question about using book down in R-do I need to load packages on each page? Help with basic understanding!

Please forgive the v basic question. I have recently started using R bookdown, to try write papers. I've read the cookbook and book down guide. I use rmardown, and understand that, but I don't ...
Gabriella's user avatar
  • 113
1 vote
1 answer
111 views

Table created with vtable package does not appear

I used to work with stargazer, but this package (vtable) is better for making summarization by groups. I choose "latex" as out and the following table was generated. However, my overleaf ...
Mateus Maciel's user avatar
0 votes
0 answers
791 views

How do you align latex to left side of knitted pdf in rstudio?

I'm creating a notebook in rstudio for the first time, and I need to knit a pdf with latex. At the moment, I have latex in the middle of the document, but I'd like it aligned to the left, as the red ...
Data's user avatar
  • 101
1 vote
0 answers
512 views

How do I insert a CFA output from R into Latex using lavaan and semTable?

I am not very experienced when it comes to Latex or R. As said in the title, I have a CFA output I generated with R Studio and now want to insert into Latex. Unfortunately, whenever I do this, my ...
non's user avatar
  • 11
1 vote
0 answers
31 views

Macro for Texstudio to select like Rstudio

How can I set a macro to select a word in Texstudio without the whitespace after the word? By Ctrl+Shift+Arrow (left, right) I get the word + whitespace. I would like to select only the word and in ...
Yuri Gelsleichter's user avatar
2 votes
1 answer
77 views

Knitr: storing variables for later use

I'm relatively new to Knitr. I want to run a function just once, so that next time I don't have to evaluate it, because it would yield a different result. My MWE: First time: \documentclass{article} \...
paulgr's user avatar
  • 21
0 votes
1 answer
640 views

Rstudio "Compile PDF" button not working after update from Windows 7 to 10 [closed]

I use LaTex to compile documents in Rstudio, and use the 'natbib' package for bibliographies. My university upgraded all computers to Windows 10 a couple months ago. After the change, I reinstalled R (...
gcgaines's user avatar
0 votes
0 answers
102 views

R Studio tinytex::tlmgr_update() gets an error

When I try to run: tinytex::tlmgr_update() I get the following error: Not sure what to do next, any advice?
Angel Cloudwalker's user avatar
0 votes
1 answer
319 views

Multiple errors after using starger

I imported the stargazer code from Rstudio and I get the following errors: -Error line 1 ! LaTeX Error: Environment table undefined.See the LaTeX manual or LaTeX Companion for explanation.Type H for ...
Timothy Cleemput's user avatar
0 votes
1 answer
2k 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 ...
rabatz's user avatar
  • 1
2 votes
0 answers
715 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....
JKR's user avatar
  • 21
2 votes
1 answer
6k 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" ...
Alejandro Carrera's user avatar
2 votes
1 answer
1k 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, ...
Mateus Maciel's user avatar
0 votes
0 answers
241 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} ...
tulu95's user avatar
  • 1
0 votes
1 answer
1k 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 ...
Tyler Peckenpaugh PhD's user avatar
1 vote
1 answer
376 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 ...
Haakonkas's user avatar
  • 171
0 votes
0 answers
195 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: \...
Lisa's user avatar
  • 1
3 votes
0 answers
4k 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 ...
alexandre's user avatar
2 votes
1 answer
472 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{...
Taylor's user avatar
  • 123
0 votes
1 answer
3k 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 ...
Yocoxcanemitia's user avatar
6 votes
1 answer
4k 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) ...
CharlesLDN's user avatar
0 votes
0 answers
41 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, ...
John's user avatar
  • 1
3 votes
1 answer
3k 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? ...
yuan-ning's user avatar
  • 133
2 votes
1 answer
8k 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 works ...
Jesper.Lindberg's user avatar
1 vote
1 answer
124 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, ...
Siobhan's user avatar
  • 41
1 vote
0 answers
136 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} \...
cassius's user avatar
  • 123
1 vote
0 answers
320 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$} \...
cassius's user avatar
  • 123
0 votes
1 answer
690 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? ...
cassius's user avatar
  • 123