I am working with a Pluto.jl notebook. I would like to use the ggplot2 R library to make some plots.
Following this example, if I run the following code in the Julia REPL then I can get a ggplot2 graph output.
using RCall
@rlibrary ggplot2
using DataFrames
df = DataFrame(v = [3,4,5], w = [5,6,7], x = [1,2,3], y = [4,5,6], z = [1,1,2])
ggplot(df, aes(x=:x,y=:y)) + geom_line()
Now, when I use the same code in a pluto.jl notebook (with each line being a separate cell), then I get the following error message:
Is there a way to get the ggplot2 image to appear inside the pluto notebook?
Similarly, if I just enter ggplot() into a cell, I get the same error, but ggplot not defined.



