CausalDiscoveryToolbox icon indicating copy to clipboard operation
CausalDiscoveryToolbox copied to clipboard

R Package (k)pcalg/RCIT is not available. RCIT has to be installed from https://github.com/Diviyan-Kalainathan/RCIT

Open SaiAditya2595 opened this issue 2 years ago • 6 comments

When I am running this code

` import cdt import pcalg #import kpcalg import networkx as nx from cdt.causality.graph import PC from cdt.data import load_dataset import matplotlib.pyplot as plt data, graph = load_dataset("sachs") cdt.SETTINGS.rpath = 'C:/Program Files/R/R-4.1.0/bin/Rscript' obj = PC() output = obj.predict(data) nx.draw_networkx(output, font_size=8) plt.show()

` I am getting this error "R Package (k)pcalg/RCIT is not available. RCIT has to be installed from https://github.com/Diviyan-Kalainathan/RCIT". I have already installed the necessary packages. I need your help on this. Thanks PFA RCIT_ERROR

CDT_Error1

CDT_Error2

SaiAditya2595 avatar Sep 13 '22 11:09 SaiAditya2595

Hello ! I think your CDT package might be linked to another R installation ; could you check if C:/Program Files/R/R-4.1.0/bin/Rscript -e "library('pcalg') ( or something close, just to check the Rscript) Does actually work properly ? Best, Diviyan

diviyank avatar Sep 20 '22 09:09 diviyank

Thank you so much for your response. I am very new to R environment. Can you please tell me where to run the above line? I will check and update you.

SaiAditya2595 avatar Sep 29 '22 07:09 SaiAditya2595

Hello ! This command has to be ran in the Windows command line otherwise, just go to the path and execute the R executable and try to execute library('pcalg')

diviyank avatar Sep 29 '22 08:09 diviyank

Error: package or namespace load failed for 'pcalg' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called 'graph' In addition: Warning message: package 'pcalg' was built under R version 4.1.3 Execution halted

SaiAditya2595 avatar Oct 12 '22 06:10 SaiAditya2595

I am trying to update my R version to 4.1.3.

SaiAditya2595 avatar Oct 12 '22 06:10 SaiAditya2595

Hello do you tackle this issue? I am facing the same condition as yours

Yihaowu9907 avatar Jul 10 '23 02:07 Yihaowu9907