I am new to R. I am running Jupyter Lab on a Windows 11 machine, and have created a virtual environment where I installed some packages and irkernel. I get the following message when I execute %load_ext rpy2.ipython
:
Unable to determine R library path: Command '('C:\\Users\\ephra\\miniconda3\\envs\\cde\\Lib\\R\\bin\\Rscript', '-e', 'cat(Sys.getenv("LD_LIBRARY_PATH"))')' returned non-zero exit status 1.
Here is my complete code:
import os
os.environ['R_HOME'] = 'C:\\Users\\ephra\\miniconda3\\envs\\cde\\Lib\\R'
os.environ['R_USER'] = 'C:\\Users\\ephra\\miniconda3\\envs\\cde\\Lib\\site-packages\\rpy2'
from src.setup import *
%load_ext rpy2.ipython
%%R
library(tidyverse)
Apart from the environment variables, the above code comes from David Mertz book "Cleaning Data for Effective Data Science". I need your help.