R Notebooks are new feature of RStudio, and are currently available only in the RStudio Preview Release.
Questions tagged [rnotebook]
219 questions
2
votes
1 answer
Include code for plots in an R Notebook output
This feels like it should be really straightforward, but I can't work out how to include the code used to create a plot in an R Notebook (i.e. above the plot it creates). Confusingly, some online examples (eg the one immediately below, from here)…

Matthew Law
- 2,293
- 2
- 13
- 16
2
votes
0 answers
R notebook in Github
I have written a notebook in RStudio (R markdown document with output: html_notebook). I would like to display it in Github. Which is the best way?
I know that it is possible to change the output in github_document but the output is a bit different.

Sara
- 43
- 1
- 4
2
votes
1 answer
Kable forces my table above my text in R, how do I fix this?
I am working on the following code with some latex (making a reproducible report document in R notebook, but for some reason my table is put above my text and equation. How do I fix this? enter image description here
title: "Empirical Research in…

Enjo Faes
- 35
- 8
2
votes
0 answers
Python chunk echos in r-markdown, but not r-notebook
I like to take notes inside of r-notebooks and have recently been trying to incorporate python code chunks into some of my documents. I have no problems executing python chunks and displaying the output, but I get different behavior depending on…

bds
- 51
- 4
2
votes
1 answer
How to set up font style and size for different sections of RMarkdown document?
Let see the following RMarkdown document.
How to set font types and sizes for these two sections, for example:
1 - "Arial, bold, 9pt" for the first section
2 - "Arial Narrow, bold, 8pt" for the second one.
Thanks!
---
title: "R Notebook"
output:…

Andrii
- 2,843
- 27
- 33
2
votes
1 answer
LaTeX in R Notebook not rendering properly in HTML (hats are skewed to the right)
When I output an r Notebook to html, and use latex, most of the output renders fine.
When I use hats though, it's not lined up properly on the character I'm 'hatting'.
For example:
---
title: "R Notebook"
output: html_notebook
---
Hello Everyone,…

bandwagoner
- 115
- 6
2
votes
1 answer
change mathjax renderer in R notebooks (with "self_contained: false")
I am creating R notebooks that contain equations. I am using RStudio 1.2.5033 on Windows 10, R 3.5.1, and rmarkdown 2.1. When my R notebooks are rendered as HTML, MathJax (v2.7.2) uses the "HTML-CSS" output processor to render the equations. But I…

user697473
- 2,165
- 1
- 20
- 47
2
votes
0 answers
Rmarkdown H1 headings as tabs (tabset)
I want a layout where the H1 sections are the tabs. Is there a way to do that?
It already bothers me that Rmarkdown uses H1 for section headings instead of titles, which is why this is not straightforward.
Example:
---
title: "The Actual…

abalter
- 9,663
- 17
- 90
- 145
2
votes
1 answer
Rstudio is changing my default R Notebook output
I start with a new R Notebook in RStudio:
---
title: "R Notebook"
output: html_notebook
---
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. Etc Etc Etc.
Then I modify it to do what I want -- for example, I'm trying to use…

C8H10N4O2
- 18,312
- 8
- 98
- 134
2
votes
1 answer
Using echo = {number} removes code toggles in R Notebooks
So if I have some code, such as:
---
title: "Data Exploration"
output: html_notebook
---
```{r, echo = 2}
data("mtcars")
summary(mtcars$mpg)
```
then I would expect only the 2nd line, i.e. summary(mtcars$mpg) to show in my previewed document. But…

nathaneastwood
- 3,664
- 24
- 41
2
votes
0 answers
How to view the output of kable and kableExtra correctly in an R notebook?
I'm having a lot of trouble rendering kable and kableExtra output correctly using R Notebooks, both inline and in the HTML Preview.
I've changed the print handling in the YAML header to kable (not sure this is necessary?):
---
title: "MIPS Sample…

Carmen Sandoval
- 2,266
- 5
- 30
- 46
2
votes
1 answer
Can not install the CRAN package `caret` on IBM Watson Studio R notebooks
While trying to install the R package caret on IBM Watson Studio R notebooks, it installs a lot of dependencies but in the end fails with non-zero exit status errors. The dependency recipes cannot be installed for some…

Sumit Goyal
- 575
- 3
- 16
2
votes
0 answers
Paned plots in R notebook export
When editing an R notebook inside RStudio, if I create multiple graphical outputs in one R block, I get an icon for each plot, which I can click on to select which plot to look at:
I like that behavior, it's especially handy to click from one plot…

Ken Williams
- 22,756
- 10
- 85
- 147
2
votes
0 answers
RMarkdown cannot knit: html_dependency not found
I am trying to create an html file using RMarkdown (using the sample .Rmd in RStudio). When I click Knit, I am getting the following message:
Error: path for html_dependency not found: Execution halted.
I have tried uninstalling and reinstalling…

db102291
- 31
- 4
2
votes
2 answers
Set Global Database Connection for SQL chunk in Rnotebook
Is there a way to set a global database connection in a Rnotebook so you don't have to set the database connection for each SQL chunk?
Currently I have to set it as follows for each SQL chunk:
```{sql connection = my_connection}
select * from…

ansek
- 443
- 3
- 17