Resolving Package or Namespace Loading Error

This topic explains how to resolve the package or namespace loading error.

Problem

When you install and load some libraries in a notebook cell, like:

library(BreakoutDetection)

You may observe the following error:

Loading required package: BreakoutDetection:

Error : package or namespace load failed for ‘BreakoutDetection’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘rlang’ 0.3.1 is already loaded, but >= 0.3.4 is required

Cause

While a notebook is attached to a cluster, the R namespace cannot be refreshed. When an R package depends on a newer package version, the required package is downloaded but not loaded. When you load the package, you can observe this error.

Solution

To resolve this error, install the required package as a cluster-installed library.