This procedure assumes you are using the jupyterlab and R installations provided through /apps.
If you are using your own installs of either of these, you may need to make some adjustments to the procedure.
In particular, you will need to make sure you have the compiler module loaded that matches the one used to build your R installation.
If you are using a custom jupyterlab environment, make sure you load that rather than the one shown here.
To use R in jupyterlab, you need to install the R IRkernel package, and then register it with jupyterlab:
module load jupyterlab/3.4.3-py3.9 R/4.2.2 intel-compiler/2021.7.0
jupyterlab/3.4.3-py3.9 R/4.2.2specified in the Modules field (under Advanced options...)
You should now have the option of creating notebooks with the R kernel in the jupyterlab interface.