Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SaiAditya2595 opened this issue Sep 13, 2022 · 6 comments
Labels
Investigation Investigation of a possible bug

Comments

@SaiAditya2595
Copy link

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

@diviyank
Copy link
Collaborator

diviyank commented Sep 20, 2022

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 diviyank added the Investigation Investigation of a possible bug label Sep 20, 2022
@SaiAditya2595
Copy link
Author

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.

@diviyank
Copy link
Collaborator

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')

@SaiAditya2595
Copy link
Author

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
Copy link
Author

I am trying to update my R version to 4.1.3.

@Yihaowu9907
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigation Investigation of a possible bug
Projects
None yet
Development

No branches or pull requests

3 participants