Questions tagged [rnotebook]

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

Related tags

219 questions
6
votes
0 answers

R Notebook - code chunk gets separated in preview

I am using R notebook to preview the file. Even though all the code is in one chunk, a line gets separated into two. Would you please tell me how I can resolve this? As you can see all the code is in one chunk. However, when I run this chunk, it…
E.K.
  • 4,179
  • 8
  • 30
  • 50
5
votes
1 answer

How to convert a Kaggle R notebook to pdf or html?

I have a R notebook in Kaggle that I would like to convert to pdf or html. All the solutions I have found in the forums seem to be python oriented. Is there any way to get that? Is there any third-party tool to convert it to the format of my choice?
Alfonso_MA
  • 537
  • 5
  • 26
5
votes
0 answers

R notebooks don't render properly when "self_contained" is FALSE because the "files" directory is deleted after rendering

It is sometimes desirable to create an R notebook that isn't self-contained. For example, one may want to load Mathjax from a local file of one's choosing, and to do so, self_contained must be FALSE. But I find that, by default, even the simplest R…
user697473
  • 2,165
  • 1
  • 20
  • 47
5
votes
1 answer

Default knit directory via YAML header in RStudio?

Is there a YAML option, which sets knit directory for an Rmd file? I.e. does the same as illustrated in Fig.1. The problem is that every time I copy files or share a project with other people (which usually have different default RStudio options…
GegznaV
  • 4,938
  • 4
  • 23
  • 43
5
votes
0 answers

How to view rendered kable in R Notebooks inline output?

I don't think I understand how table rendering works inline in R Notebooks, and how kable output is formatted inline as well. I'd just like to be able to see dataframes in my notebook's inline output the way they appear when previewing the notebook…
Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46
5
votes
3 answers

Adding a table of contents in an r notebook

There doesn't seem to be a problem when I add a table of contents to an r markdown file but nothing happens when I add this to an r notebook: output: html_document: html_notebook: toc: true depth: 3 theme: united Is it…
GR1818
  • 139
  • 1
  • 13
5
votes
1 answer

Why setting working directory in R Notebook doesn't change working directory in console?

Rstudio states that: the current working directory inside a notebook chunk is always the directory containing the notebook .Rmd file. Understood. But if within a notebook we setwd() to something (either to "the directory containing the notebook…
Scransom
  • 3,175
  • 3
  • 31
  • 51
5
votes
1 answer

Invalid filename error when plotting in Rmarkdown

I just installed Rstudio 1.0.44 on a company windows 64-bit PC. When I tried to make any plot, I got this error: Error in (function (filename = "Rplot%03d.png", width = 480, height = 480, : invalid 'filename' Now the Traceback showed me this…
4
votes
1 answer

Can I apply styling to inline code in an R Notebook?

When you use inline code in an R Markdown document, the code is evaluated and the output is incorporated into the text. For example, The sum of 2 and 2 is `r 2+2`. This will generate the following text in the .nb.html file: The sum of 2 and 2 is…
Sean Raleigh
  • 579
  • 4
  • 10
4
votes
1 answer

How to increase the width of the table output in RStudio Notebook visual markdown editor

I'm trying to use a notebook in RStudio for an interactive demonstration for students. I like the visual markdown editor, but I'm struggling to format the output. I can't figure out why the width of the output table is not 100%. It looks fine in the…
M4RT1NK4
  • 433
  • 1
  • 4
  • 9
4
votes
1 answer

Trailing period after section number in Rmd notebook

I have an R notebook like the following: --- title: "R Notebook" output: html_notebook: number_sections: true toc: true --- # First section ## Subsection Some text # Second section When rendered to Preview Notebook in RStudio, it…
Vasily A
  • 8,256
  • 10
  • 42
  • 76
4
votes
2 answers

kable showing html code instead of html table

I was trying to use kable to generate a beautiful table. However, kable just returned the html code instead of the table itself in r notebook (R version 3.5.0, R Version 1.1.453 on a Mac). Test 1 ```{r} library(knitr) dt <-…
JetLag
  • 296
  • 1
  • 4
  • 16
4
votes
0 answers

R markdown global option warning=FALSE not working as expected

I'm using an Rmd notebook in RStudio and have attempted to set global options at the beginning of the document. I'm trying to suppress messages and warnings. I'm getting behavior in the inline source tab that is not what I expect. It behaves as…
Jeff Jarvis
  • 85
  • 1
  • 8
4
votes
2 answers

R Notebook: place knitr::kable tables side-by-side?

I'm writing up some figures and tables in an R Notebook, and I have a few tables I would like to place side-by-side. I am knitting the notebook to a html. The code I have at the moment (below) works, but both tables are aligned to the left. What I…
astro person
  • 381
  • 5
  • 16
4
votes
2 answers

R Notebook: Include figures in report and save plots

I'm using an R Notebook and I'd like my plots to automatically save to disk when the code is run, as well as display inline. knitr: include figures in report *and* output figures to separate files addresses this for R Markdown but the solution…
Lauren Fitch
  • 346
  • 4
  • 12
1
2
3
14 15