Hindol Ganguly
Hindol Ganguly

Reputation: 363

Error in installing ggplot2 and ggthemes

while I tried installing ggthemes R recommended me to restart the session. I did the same & after that i installed ggthemes. Two snippets of the notifications when the installation was in progress are,

** testing if installed package can be loaded * DONE (ggplot2)

testing if installed package can be loaded * DONE (ggthemes)

After that; The downloaded source packages are in ‘/tmp/RtmpcObZzw/downloaded_packages’

Now when I am calling the ggthemes package, this is throwing me the following error.

Loading required package: ggthemes
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘ggplot2’ 2.1.0 is already loaded, but >= 2.2.0 is required

I had already installed ggplot2 earlier & performed operations swiftly also. But now my R studio fails to remember even the ggplot function telling me:

"Error: could not find function "ggplot"".

How to upgrade ggplot2 such as it has the version >= 2.2.0 & carry out the ggplot & ggthemes operations accordingly?

Upvotes: 0

Views: 1865

Answers (1)

user23682960
user23682960

Reputation: 1

I came across this same error it wouldnt let me load in ggplot2, the way I found myself go around this was you do need to restart R once you do that go to the console and try install.packages("ggplot2") it should try and redownload the content for ggplot2, It happened with a ggthemes and ggrepel for me. Once everything has been installed then go library("ggplot2") to extract all the content then you should be good to go.

Upvotes: 0

Related Questions