Hello!
I have previously not had any problems with my packages in R.
But once I started to download the packages "bnlearn", "Rgraphviz" and "gRain" I started to receive an error once I tried to install them.
I have uninstalled R and R-studio and now I get to download bnlearn but not Rgraphviz and gRain.
I got and still get the following error: Warning in install.packages :
installation of package ‘/var/folders/_0/3l6342lx6kd1z0_9lhxlw1f80000gn/T//RtmpPpcRUX/downloaded_packages/gRain_1.3-0.tar.gz’ had non-zero exit status*
It was the error "had non-zero exit status" I got before and I still get.
It's because it seems like gRain is connected with gRbase. So no none of them seems to work. I have tried to reinstall both. Downloading previous versions of both and installing them locally (using the install button) and tried to place the packages within the package-folder myself.
None of the things seems to work.
Woops - sorry about that.
My lecturer told us that the newest version of gRain has an error and therefore we should install an older version and she provided us this code:
when it comes to understanding errors from attempted install, as a general rule, errors propogate further errors... so not much point looking at errors later in your flow.
The most important error to fix, is the first error printed out. solve, and repeat as necessary. Can you scroll up and provide that please ?
Please do not use screenshots they are difficult to read and you can't copy information from them making things harder for people trying to help you. Instead of that paste the error messages here directly as formatted code, here is how to do it:
About your issue, you are trying to install that package from source which means it is going to need compiling but you don't have the gfortran compiler installed in your system, follow the official CRAN instructions about libraries needed to compile packages on macOS systems.