RCall.jl - how to handle R package dependencies?

Hi there,

I’m working on an experimental feature for CounterfactualExplanations.jl that adds native support for explaining R torch models. This is made possible by RCall.jl and local tests are passing. But since torch is not a standard library in R, my CI workflow fails (as it should). So I’m wondering:

Q1: Is there an elegant/preferred way to install R package dependencies on load?

I’m conscious that by having my Julia package depend on R package I might be opening up a can of worms, but having native support for this kind of interoperability would be awesome. I’m planning to restrict myself to torch and perhaps one or two other packages in the long run. Still, I’m wondering:

Q2: Is relying on deps of other languages utter madness or feasible?