library won't load after installation

Hi all, I've been trying to install the geofacet package and, although the installation seems to work, I get the following error:

Error: package or namespace load failed for ‘geofacet’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘sf’

I looked for similar errors, have tried uninstalling and installing with dependencies=TRUE, that won't help.
Anyone have other ideas?

The error message indicates a missing dependency, the sf package. Try installing it with


If you are on macOS and get the message to the effect "source version is later, do you want to install from source" answer no. sf won't compile from source on macOS. (I've tried.)

Thank you, yes, I noticed that previously and had installed sf, while doing so I got a prompt:

"do you want to install from sources the package which needs compilation?"

The first time around I answered "yes", and I was still unable to load geofacet, so I uninstalled sf.
This time around I answered "no" and it finally worked. Do you happen to know why that might be the case?

Thanks again!

Either you are lacking the necessary tools for building packages from source in your system or you have them misconfigured. By answering "no" you are installing a precompiled binary version that is a little older but much easier to install

On macOS, packages sometimes fail to install, often with a non-zero exit status message. This is due to Apple's idiosyncratic compiler. The same packages will install on most Linux systems without trouble. Saint Simon Urbanek of the R Core Development Team takes on the brain damage required to recode the source to get around macOS's peculiar worldview for those in CRAN, but he can't bestow the same mercy on those still in development.

Some packages will successfully install through compilation from source, but many won't.

When installing if you are offered the option to install from source, it makes sense to try it once. But, if at first it doesn't succeed, in all likelihood it never will. It's usually only 7-10 days until a macOS binary is available

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.