R Notebooks are new feature of RStudio, and are currently available only in the RStudio Preview Release.
Questions tagged [rnotebook]
219 questions
214
votes
9 answers
Difference between R MarkDown and R NoteBook
I am trying to understand at a high level what the differences between R Markdown and R NoteBook. I know they are interrelated but I would like to figure out how they are related. My understanding is this:
I know R Notebooks are really R Markdown…

PagMax
- 8,088
- 8
- 25
- 40
28
votes
2 answers
Warning messages keep appearing in RStudio notebooks in chunks unrelated to the warnings
I am starting to use RStudio notebooks, and I am still trying to understand how some of the things work.
I do not understand why some produced warning messages are kept and appear when executing code that is completely unrelated to the message. For…

Javier Fajardo
- 737
- 1
- 10
- 22
16
votes
4 answers
How to embed local Video in R Markdown?
I already know how to embed the youtube video in the R Markdown document.
But Suppose I have offline video, that I do not want to publish, in mp4 or avi format. Is there a way to embed it in the document?
Something like the following (taking…

Harmanjit Singh
- 163
- 1
- 1
- 5
12
votes
2 answers
how to change number of columns and rows showing in R studio notebook dataframe
When I run my R studio notebook, the dataframe/tables are defaulted to 10 rows. How can I display 20 rows?
As well, if I have many columns, I have to click the "next" button on the top right to see the other columns. How can I display all the…

user1569897
- 437
- 1
- 5
- 12
10
votes
3 answers
Getting R printed texts to have color esp. in R markdown knits?
Very simple question: I love writing R notebooks/markdowns, and with something like highlight: tango I can give background color to codes when I knit my notebook to pdfs.
However, I don't know how to give colored backgrounds or colored fonts to…

Kim
- 4,080
- 2
- 30
- 51
10
votes
3 answers
Modularized R markdown structure
There are a few questions about this already, but they are either unclear or provide solutions that don't work, perhaps because they are outdated:
Proper R Markdown Code Organization
How to source R Markdown file like…

CoderGuy123
- 6,219
- 5
- 59
- 89
9
votes
1 answer
How to add more space between columns of knitr::kable() in RStudio notebooks?
I want to use function knitr::kable() in an RStudio notebook.
If column names are short, the spaces between columns are small and it makes information hard to understand (see figure below). It seems that padding does not work in this situation. Is…

GegznaV
- 4,938
- 4
- 23
- 43
9
votes
1 answer
R notebook generates a blank plot in addition to actual plot
I am using R notebook. This is my chunk:
```{r}
test = matrix(rnorm(200), 20, 10)
pheatmap::pheatmap(test)
```
I guess it's due to the way pheatmap generates the plot, but it actually generates a blank plot first. Thus, this is the output I…

burger
- 5,683
- 9
- 40
- 63
8
votes
1 answer
R notebook: opts_chunk has no effect
I'm working on my first R notebook which works pretty well, except for one issue.
I'd like to be the numbers that I output inline with
`r realbignumber`
to have commas as separator and max 2 decimal points: 123,456,789.12
In order to achieve this,…

Me Myself
- 105
- 6
7
votes
3 answers
How to get console output and plot side by side in a R Notebook?
In a R Notebook there is a function that makes many plots and print summary statistics in the console.
I would like to get the plot and the console output (i.e. summary statistics) side by side on the HTML output.
Here is a very simple…

Paul
- 2,850
- 1
- 12
- 37
7
votes
2 answers
In-line R expression returns incorrect value
If the R code in Rmd file reuses the same variable name, the inline r expressions seem to return the last value of this variable regardless of the location of the inline expression. Is there away to avoid this behavior except for making sure the…

Sasha
- 5,783
- 8
- 33
- 37
7
votes
1 answer
How to resize ggplot graph in r notebook
I want to resize ggplot graph in Rnotebook.
It's too big it doesn't show anything like above. When I export it and increase the size about 4 times bigger, then it shows the details.
I've attempted the followings:
set_plot_options
fig.height,…

tmhs
- 998
- 2
- 14
- 27
6
votes
2 answers
Run selected Rmd chunks in a single command
I'm experimenting with Rmd Notebooks, and I'm stuck on something that seems like it should be possible but I cannot figure out a solution at all.
Basically, I would like a functional way to run selected Rmd chunks without compiling with knitr. So I…

plcefrmyhd
- 103
- 7
6
votes
2 answers
How to layout 2 rows followed by 1 column with renderPlot in rmarkdown html_notebook with runtime shiny
Consider the following rmarkdown html_notebook example:
---
output: html_notebook
runtime: shiny
---
```{r}
library(ggplot2)
library(shiny)
blank1 <- renderPlot({ ggplot() + labs(title = "Plot 1") })
blank2 <- renderPlot({ ggplot() + labs(title =…

JasonAizkalns
- 20,243
- 8
- 57
- 116
6
votes
3 answers
ggarrange with common legend produces extra blank plot in markdown
I am using R Notebooks and have a chunk with some code for arranged histograms. When I use a common legend it produces an extra empty plot, which looks terrible in the rendered html file. This phenomenon disappears without a shared legend, but the…

BKV
- 223
- 3
- 4