I am very new to R and R studio with only basic understanding. I am having trouble installing and loading bkmr package. I have updated my Mac iOS software, R, and R studio. Removed and re-installed bkmr package every time. I keep getting the following error. Of note, I put in **** where my username is to hide it.
library(bkmr)
Error: package or namespace load failed for ‘bkmr’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users//Library/R/x86_64/4.1/library/gmm/libs/gmm.so':
dlopen(/Users//Library/R/x86_64/4.1/library/gmm/libs/gmm.so, 6): Library not loaded: /usr/local/gfortran/lib/libgomp.1.dylib
Referenced from: /Users/****/Library/R/x86_64/4.1/library/gmm/libs/gmm.so
Reason: image not found
You only list the result of using the package: library(bkmr).
Did you get any messages when you did the install: install.packages("bkmr").
When I did this (on Windows so on your side it may look different) the first lines of output were
> install.packages("bkmr")
Installing package into ‘D:/tools/R/Packages’
(as ‘lib’ is unspecified)
also installing the dependencies ‘dotCall64’, ‘spam’, ‘maps’, ‘gmm’, ‘fields’, ‘truncnorm’, ‘tmvtnorm’
Your error message suggests that the gmm package is not correctly installed.
You could try to install it separately.