Hello,

First, let me just say that I'm still quite new to R, so forgive me of my ignorance.

I'm trying to install and load this package called 'IMak'. And so, I did the following procedure:

install.packages("IMak")
library(IMak)

But then , when I try to load the package, it gives me this error message:

Error: package or namespace load failed for ‘IMak’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so
  Reason: image not found

I spoke with the developer of this package and he told me to download 'imager', so I did that by writing the following code:

install.packages("imager")
library(imager)

But I still get the following error message when trying to load 'imager':

Loading required package: magrittr
Error: package or namespace load failed for ‘imager’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so, 6): Library not loaded: /opt/X11/lib/libX11.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/imager/libs/imager.so
  Reason: image not found

So I'm kind of lost right now on what I should do. Looking for some advice on how to move forward please :slight_smile:

Make sure you have XQuartz installed/updated in your system (not in R).