0

I am using Atom.io to write Rmarkdown files. It works pretty well so far, but I can't get the graphical results of a code chunk to show in the preview / knitted (saved) file.

Current packages: Hydrogen, atom-language-r, markdown-preview-enhanced

If I run the code via Hydrogen in the rmarkdown file the graph is displayed inline. But if I run the code in the rmarkdown preview via markdown-preview-enhanced. The graph doesn't show either in the preview or when I save the file.

Here is a picture of me running the code using Hydrogen

On the left is the actual .rmd file. If I right click and "run cell" using Hydrogen the boxplot shows up. But, if I run it in the preview the boxplot does not show up (below)

Here is a picture of my workspace.

I would like the boxplot saved inside the final document (html or pdf), but cannot get it to embed into the saved rmarkdown file.

Liz
  • 23
  • 4
  • I'm not exactly sure of your intention, but nonetheless... Have you run the R code before using knitr? OR Have you saved the images that can then be called by your markdown reader? – mccurcio Mar 27 '21 at 18:51
  • I have used knitr in Rstudio, but I'm trying to write / knit rmarkdown in Atom-editor instead. I haven't found a way to save the image of the graph in Atom. Do you know how to either knit in Atom or save the graph's image? – Liz Mar 27 '21 at 20:32
  • Your question is muddled. Could you be more specific on your goals(s)!?! Are you 1) using Atom to create markdown documents with saved images (which happen to be from R) OR 2) is it that you want to use Atom to create markdown docs AND run your R code? – mccurcio Mar 28 '21 at 15:46
  • I'm sorry. I tried to be as clear as I could. I want Atom to show the graphical output from an r code chunk within the rmarkdown file. – Liz Mar 29 '21 at 04:41

0 Answers0