R Notebook stops printing graphs inline

RStudio Desktop starts printing graphs to console instead of inline

When I start RStudio R Notebook or markdown, I can print graphs (e.g. ggplot2) inline. However, as I start adding more code to the window with tabular output (which shows inline) and then try to print the graph, it begins printing into the console instead of inline. I am not changing the html setup and the original default setup stays the same. When I run Preview Notebook, only the code shows without any output, tabular or graph. When I knit html, both the code and the output (tabular and graph) show.

I cannot detect why RStudio switches from inline to console for graphs, anyone has experience with this? I know it is not specific to the R code (I am using R 3.6.0) since those same charts worked before inline and they still show inline on a fresh Notebook / Markdown. When I got to check on chunk printing setup, it still says inline.

I discovered a workaround:

    chunk_output_type: inline

This should not be required because the Notebooks' default is inline and I would not change it. However, this code seems to have fixed the issue.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.