How can I know if the namespace of a package is imported by others?

Viewed 53

This triggers a warning :

library(tidyverse)
library(glue)
detach("package:glue", unload = TRUE)
# Warning message:
#   l'espace de noms ‘glue’ ne peut être déchargé :
#   l'espace de noms ‘glue’ est importé par ‘tidyr’, ‘dplyr’ et ne peut, donc, pas être déchargé

(excuse my French)

I would like to anticipate the warning, so I'm looking for a function similar to is_unloadable below :

library(tidyverse)
library(glue)
is_unloadable(glue) # 
# [1] FALSE
0 Answers
Related