I opened RStudio and created
R Notebook. It contained the default content automatically generated and contained one graph obtained from
plot(cars). Then I clicked
Knit to HTML.
The yml changed from
title: "R Notebook" output: html_notebook
title: "R Notebook" output: html_document: df_print: paged
In the folder where the code was located, two files were generated,
.html contained the plot, but
.nb.html does not contain the plot.
I pasted the
<img src="data:image/ from the source code of
.nb.html to an empty html file. The graph appeared.
Could anyone know why this happened and how to show graphs in
.nb.html? Thank you.