Closed alex-glynn closed 10 months ago
It seems you are having trouble installing igraph, not ggdag. In particular, you are having trouble compiling it. Have you compiled packages from source before? You may need to install some extra things on mac to run it, e.g. run xcode-select --install
in your terminal.
The simple solution here, though, is to try to install from binary, e.g. install.packages("igraph", type = "binary")
. igraph can be troublesome to compile even with the right setup so it's better to use the pre-compiled version.
caveat: you seem to be using brew to manage R, and I think there are some peculiarities about that that I forget the details of.
Dear Mr. Barrett,
Thank you for getting back to me so quickly.
As you suspected, Homebrew seems to have been the problem. There’s some speculation on Stack Overflow that it’s an issue specific to newer MacBooks with M chips. I reinstalled R from CRAN, and there was no further issue.
I’m two chapters into Causal Inference in R, by the way. It’s been great so far.
Many thanks, Alex
Glad to hear it. We just updated our chapter on DAGs, so a good time to get the package working!
If I try to install
ggdag
, I get the following error messages:R version 4.3.2 on a MacBook Pro running Sonoma 14.0