When trying to use the sample code for SubgraphMining (the example is on 35th page), I get an error:
"Error in setwd(paste(Sys.getenv("R_HOME"), "library", "subgraphMining", :
cannot change working directory"
I'm using RStudio 0.97.551, 32-bit R (2.15.3 - this version of R was recommended to use with subgraphMining), igraph0 (was recommeded too, instead of igraph library), Java installed. Operation system is Windows 8. Can anyone help me with the issue?
The error message is coming from the gspan
function of subgraphMining
, from here:
setwd(paste(Sys.getenv("R_HOME"), "library", "subgraphMining",
"parsemis", sep = "\\"))
The reason for it is that R uses /
as path separator, and not \\
, which only works on windows. A workaround is not modify the function and use /
instead of \\
.
Btw. this has nothing to do with the igraph package, so I'll remove that tag.
In my case, it displayed the error because I expected it to create a new folder which I mentioned in the path in setwd. Unfortunately, R does not have this functionality and the matter was resolved when I created the folder and then used setwd command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With