Questions tagged [rnotebook]

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

Related tags

219 questions
2
votes
0 answers

How can I render interactive plots into static html to be sent and rendered in an email

When I use interactive charts from plotly or tables from datatables and I use rmarkdown rmarkdown:::render to html I can get interactive charts in a web browser. When I try to send this html file as an email the interactive graphs are purely not…
statquant
  • 13,672
  • 21
  • 91
  • 162
2
votes
0 answers

Pass variables between R and Python in R Notebook

When working in an R Notebook: If I define a variable in an R chunk it is added to the global environment and is accessible to all other R chunks. ```{r} a = 1 + 4 a ``` However, I haven't been able to pass the variable into a Python chunk or to…
2
votes
1 answer

Does knitr not support syntax highlighting in SQL common table expressions?

knitr is documented as supporting syntax highlighting in SQL, however, in the following example only one chunk is highlighted correctly: --- title: "R Notebook" output: html_document: default --- ```{sql select, eval=FALSE} SELECT foo FROM…
DaveRGP
  • 1,430
  • 15
  • 34
2
votes
1 answer

Can I use R Notebooks as R package vignettes?

I know I can use Rmd to build package vignettes but want to know if it is possible to R Notebooks more specifically to make package vignettes. If so, is there anything different I need to write R Notebooks as package vignettes? I am using the latest…
Brash Equilibrium
  • 1,357
  • 4
  • 14
  • 35
2
votes
1 answer

In r studio, how does the IDE treat notebooks with the 'preview' button

I am building a custom formatted notebook using some css and html. As recommended this is implemented using a wrapper function around an rmarkdown function. quarterly_report <- function(toc = TRUE) { # get the locations of resource files located…
DaveRGP
  • 1,430
  • 15
  • 34
2
votes
1 answer

Excluding part of the R markdown (html_notebook) from the final html output

I am writing a relatively long report using R Notebook that makes use of R markdown language which combines text and code in the same document and generates html output. I would like to be able to exclude some of the analysis (both text and R code)…
Sasha
  • 5,783
  • 8
  • 33
  • 37
2
votes
0 answers

Date datatype issue in RNotebook

This is my first question on SO I loaded a CSV file into R Notebook using train -> fread("name.csv") Used head(train) which displayed first 6 rows. Everything was working fine. Then i tried converting the data type of Date column from default…
rajesh-nitc
  • 5,049
  • 3
  • 25
  • 33
2
votes
1 answer

Images not showing in R notenook (nb.html file)

When I knit to HTML, images show up fine in the .html file, but not the .nb.html one. MWE is the R Notebook template: the plot(cars) image does not show. Per suggestions listed here: RStudio notebook does not show data.frames when I compile, I tried…
jtr13
  • 1,225
  • 11
  • 25
2
votes
1 answer

Running R-Notebook on an AWS-VPC with no internet acess

I am running RStudio-server on an AWS-VPC with no internet access. When I try to open a new R-Notebook it gets stuck on the loading wheel screen. I have two hypothesis: RStudio tries to connect to the internet (for some reason). Since it can't, it…
Luciano Viola
  • 61
  • 1
  • 5
2
votes
0 answers

Interleaving messages printing and plots inside a for-loop

I'm trying to execute a for-loop inside a r notebook chunk to print some messages and a plot interleaved, shown in the code below: for(i in 1:2) { print(paste0("before ", i)) plot(i, i) print(paste0("after ", i)) } However, the first plot…
2
votes
1 answer

No line breaks inside code chunks

I'm using R v. 3.3.2 and RStudio v. 1.0.44 on Mac. I love using RMarkdown and the new'ish Notebook flavor of markdown. However, I've recently noticed a new behavior. Line breaks in my R code chunks, are not reflected in the HTML notebook file. For…
Brad Cannell
  • 3,020
  • 2
  • 23
  • 39
2
votes
1 answer

Incremental Plot in R Notebook Error

I am trying to create an incremental HE plot in an R notebook that will be compiled to HTML (so a .R file). The function I am using heplot() from the heplots package uses an add = TRUE parameter to overlay the graphic over the previous one, which is…
Twitch_City
  • 1,236
  • 1
  • 10
  • 22
1
vote
1 answer

R notebook produce blank outputs before desired ones

I wrote a R code to display multiple images in one: library(tidyverse) library(fable) myfit <- tsibbledata::global_economy |> filter(Code %in% c("CAF", "AUT")) %>% model(arima = ARIMA(Exports)) plot_list <- sapply(1:2, function(x) {myfit %>%…
Mangiafoco
  • 19
  • 4
1
vote
1 answer

R Shiny brush zoom a dynamically sized image

I have been looking at advanced interactive plots in Shiny and I am struggling with how to accomplish a brush and double click zoom on an image, as opposed to a plot. To further complicate matters, I am showing an image and a plot side by side in…
dragon951
  • 341
  • 1
  • 8
1
vote
1 answer

Loop over an entire r-notebook

I was just wondering if it is possible to loop over a r-notebook from an external r file? My dataset contains a group variable "group" and I should generate a report for each of the 32 groups separately (plus one for the groups together). My…
D. Studer
  • 1,711
  • 1
  • 16
  • 35