Reputation: 31
I want to use ggtext packgae for visualization in R, but while I loaded the packgae that I have installed before I found this error:
Error: package or namespace load failed for ‘ggtext’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
namespace ‘ggplot2’ 3.1.0 is already loaded, but >= 3.3.0 is required
What might be the main problem? How can I solve it?
Upvotes: -1
Views: 1027
Reputation: 66
That error helps... when it says: "namespace ‘ggplot2’ 3.1.0 is already loaded, but >= 3.3.0 is required" means that the version of ggtext you've installed needs ggplot2 to be upgraded (to at least 3.3.0) for it to work (it must use a newish feature in ggplot).
Fix: restart R, install.packages("ggplot2"), then try again (you may need to install.packages("ggtext") again).
Upvotes: 1