Questions tagged [rnotebook]

R Notebooks are new feature of RStudio, and are currently available only in the RStudio Preview Release.

Related tags

219 questions
1
vote
0 answers

R Notebook: do not get figure captions despite having set "fig_caption: TRUE"

I add "fig_caption: TRUE" to the default R Notebook example: --- title: "R Notebook" output: html_notebook fig_caption: TRUE --- This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results…
user2955884
  • 405
  • 2
  • 11
1
vote
0 answers

How to format a table in RStudio Notebook output

I am using an RStudio R Notebook in the visual editor and would like to format the default table output for a tibble. tibble(letters, number=1:26*1000*rnorm(1)) For me it looks like this: E.g. I would like to define the number of digits and the…
c0bra
  • 1,031
  • 5
  • 22
1
vote
1 answer

How to save .nb.html notebook file in another directory than the one with the .rmd file?

Context: I have a R project with disctinct folders for scripts, outputs and data. To match this logic, I would like to have .rmd files in the ./scripts/ folder while saving the .nb.html file in the ./outputs/ folder. Question: how to make knit save…
Paul
  • 2,850
  • 1
  • 12
  • 37
1
vote
0 answers

Is there something like fig.width and fig.height in r notebooks without the margins?

In r notebooks or markdown documents, if one specifies fig.width or fig.height for generating an image with ggplot, the size of the box containing the actual data is heavily influenced by the size of the margins and their elements (labels, legends…
Manuel
  • 111
  • 2
1
vote
0 answers

writing .Rmd files in Geany IDE

I've been using Geany under Linux to write R scripts for years. Now I want to use R Notebook and R Markdown. So, what should I do to make Geany recognize .Rmd files used by R? Is it possible? I did not find a proper plugin or documentation for .Rmd…
Antonio
  • 563
  • 1
  • 5
  • 12
1
vote
1 answer

R Notebook: TOC is not kept on the left when knitting to html

I have the following R notebook: --- title: "test" author: "by me" date: 'last updated: Jan 23, 2022' output: html_notebook: toc: yes toc_float: yes number_sections: yes highlight: haddock --- # First headline ## Second…
deschen
  • 10,012
  • 3
  • 27
  • 50
1
vote
1 answer

R: renv within R notebook-scoped (Rmd) workflows

I am looking for a way to make my R notebook-centric workflow be more reproducible and subsequently more easily containerized with Docker. For my medium-sized data analysis projects, I work with a very simple structure: a folder with an associated…
Claudiu Papasteri
  • 2,469
  • 1
  • 17
  • 30
1
vote
1 answer

RStudio R Markdown Notebook: Change colour of "chunk background highlight" option in Source panel (not Knitted document)

For R Markdown Notebooks, in RStudio > Tools > Global Options... > R Markdown > Advanced : There is the option to Enable chunk background highlight. This is useful to distinguish between code chunks and markdown sections. I use a dark Editor theme…
Buzz B
  • 75
  • 7
1
vote
2 answers

How to make options(width = 60) persist across code chunks in R Markdown used as notebook in RStudio?

I have an R Markdown file that I want to use as a notebook inside RStudio by interactively executing individual (!) code chunks and seeing their results, e.g., prints, tables, plots, displayed under the code chunk. In particular, I am not…
cbaumbach
  • 13
  • 4
1
vote
0 answers

Rmarkdown: add a title and a plot for each subgroup

I would like to create a Rnotebook that contains for each group in my data: A subsection header with the group name A plot containing the data for that group. (obs the alternative of adding the group name to the title of the plot does not let me…
LucasMation
  • 2,408
  • 2
  • 22
  • 45
1
vote
2 answers

Can people without R installed run an R Notebook file successfully?

I have an R Notebook that I am building to provide an analysis for somebody, and I am wondering if I should choose another option as I don't know if she will be able to run the Notebook without having R installed. Is it possible to run an R Notebook…
Mus
  • 7,290
  • 24
  • 86
  • 130
1
vote
0 answers

R notebook loose images after a few days opened in Rstudio

I'm using Rstudio notebook to create nice Rmarkdown reports generated in html. Rstudio is opened during days on the same notebook, and sometimes all images disappear except those recently generated. In the html, I see they are still existing, but it…
Mycky
  • 33
  • 3
1
vote
0 answers

How can I have a "retractable" table of content in Rmarkdown like Toc2 (in a jupyter notebook)

I am trying to find a way to get a "retractable" TOC of my rnotebook as a left sidebar (by this I mean the TOC should totally disappear). The idea being that the basic TOC takes too much room on the left side of my document. I found an example for…
statquant
  • 13,672
  • 21
  • 91
  • 162
1
vote
1 answer

Reduce size of a plot in R notebooks preview

Graphs in Rstudio notebooks generated using "Preview Notebook" take all the width of the HTML page. For example, for the default RStudio notebook: I would like the plot to be smaller in the HTML page, not taking all the width. I tried fig.width and…
danilinares
  • 1,172
  • 1
  • 9
  • 28
1
vote
2 answers

How to paste R script together to generate one Notebook?

I have several R scripts, say a.R, b.R, c.R. I want to paste all scripts together to one file and then use this file to generate a Notebook. In a.R, the code is #' This is some text in a.R to be used in Notebook. dat1 <- 1:10 In b.R, the code is #'…
Qi Yin
  • 139
  • 7