2

I am new in R and trying keras in Rstudio. All the accuracy, loss interactive plots by running fit() are appearing in Viewer pane instead of Rmarkdown file.

All other plots usually plot inside Rmarkdown files but not with keras.

I have also checked Global settings in Rstudio Tools>Global Options>R Markdown>Show output preview in "Window".

How do I make them plot in Rmarkdown instead of Viewer Pane.

How do I make this mandatory for all plots to create inside Rmarkdown files only and now in viewer pane?

ViSa
  • 1,563
  • 8
  • 30
  • 1
    In RStudio, when you open a new RMarkdown file, in the editor pane, there is a cogwheel button / menu where you can choose "Chunk Output Inline". That should put the plots into the document. – meriops Nov 06 '20 at 15:31
  • @meriops `Chunk Output Inline` is already check marked in my `rmarkdown` file but still I get only `keras` function's generated charts in `Viewer` pane. – ViSa Nov 06 '20 at 19:00

1 Answers1

0

have you tried to plot in only one cell ?

for example you have a code block only like this

plot(x = dataframe$x, y = dataframe$y,
   xlab = "X",
   ylab = "Y",
   xlim = c(0,1.5),
   ylim = c(0,1.5),
   main = "X and Y between 0 and 1",
   col = dataframe$color,
   pch = 16,
   cex = 1.5
)

if you convert the rmarkdown file into html, the output of the plot will be shown enter image description here

like this, in the browser. the only criteria you need to respect is put the plot function call alone in one cell

alexzander
  • 1,586
  • 1
  • 9
  • 21