'How to resolve error in k-medoids algorithm?

For clustering a data set (USArrests), I want to use k-medoids clustering. I wrote the following codes:

library(factoextra)
library(cluster)
df <- USArrests
df <- na.omit(df)
df <- scale(df)
fviz_nbclust(df, pam, method = "wss")

Unfortunately, I see the below error at output. How I can resolve this error?

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘vctrs’ 0.3.5 is already loaded, but >= 0.3.6 is required



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source