RCall.jl icon indicating copy to clipboard operation
RCall.jl copied to clipboard

Feature Request: show/display methods for R plots like ggplot2

Open schlichtanders opened this issue 2 years ago • 3 comments

It would be great if RCall would support rich outputs for plots, so that inside Pluto.jl RCall plotting works. (PythonCall has such support, but I guess Python's matplotlib is quite different from R's ggplot2).

schlichtanders avatar Nov 22 '23 18:11 schlichtanders

Looking into IRKernel, the jupyter support, it seems a combination of the R package repr and R Base evaluate is needed.

Here is the entry point for IRKernel https://github.com/IRkernel/IRkernel/blob/master/R/execution.r#L313-L321

schlichtanders avatar Nov 22 '23 19:11 schlichtanders

Looks this PR does something related: https://github.com/JuliaInterop/RCall.jl/pull/409

frankier avatar Nov 28 '23 12:11 frankier

The PR gives a macro, which actually relies on being a macro in that it can change the code.

I would rather appreciate if the show and display functions could directly be overloaded to support rich html output

schlichtanders avatar Nov 28 '23 12:11 schlichtanders