Using R to process the datacube

I’m not very familiar with R, nonetheless I’d like to try using it to process some data. I think the examples provided are outdated so, could anybody help with an example of how to open the datacube or provide a functional notebook with R?

Thanks in advance,
Max

Hi Max

I’m not an expert here but I usually run R from Julia itself. The problem with R is that it needs to bring the object to memory and the cube (or even parts of it) are several Gb. So I follow the guides on reading the cube from Julia, extract the layers I’m interested on, do some pre-processing in them already from Julia, and only when I really need statistical tools I do analysis in R with small parts of the dataset.

To do so, I include the following Pkg.add("RCall") at the top of my Julia file. Once I’m ready to use R, then I call R from Julia with:

R"""
<r code here>
"""

You can learn more tricks here: https://github.com/JuliaInterop/RCall.jl
Cheers

Juan