rendering ggplot in html output
I am using RCall in .jmd file where I used the mtcars dataset to make a simple ggplot.
using RCall
mtcars = rcopy(R"mtcars")
R"""
(p <- ggplot(mtcars, aes(drat, wt)) + geom_point())
"""
What do I need to do to get this rendered in the html file that is weaved? This the output I get

Obviously, just printing p in the julia chunk throws an error. Am I missing something?
Possible duplicate of #340
What should happen if you call
R"""
ggplot(mtcars, aes(drat, wt)) + geom_point()
"""
in a jmd file? In a Jupyter notebook, the resulting figure is shown. I cannot get this to work in a Julia markdown file, though.
in the interactive mode in a jmd file, it will produce an external window where the ggplot2 is rendered. But when you weave the document, it does not render.
It certainly renders, but is there no way to get the output included in the weaved markdown file?
doing this has the same result:
using RCall, DataFrames
d = DataFrame(v = [3,4,5], w = [5,6,7], x = [1,2,3], y = [4,5,6], z = [1,1,2])
ggplot(d, aes(x=:x,y=:y)) + geom_line()