3

Every time I start RStudio, I'm getting the following error message even though I have removed the package in question:

Loading required package: GEOquery
Error in .requirePackage(package) : 
unable to find required package ‘GEOquery’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
there is no package called ‘GEOquery’

Is there way to fix it?

As a matter of fact I can't even see my last work history which was used to be before I installed this package of GEOquery.

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
kcm
  • 135

2 Answers2

2

Remove GEOquery from the list of required package

At some point you (or someone else) added this package as "required" in the .Rprofile.

Background:

Only the base packages are loaded on startup. However you can choose to load additional packages by adding them to your .Rprofile which you must create. This is simply a text file (called .Rprofile) with R code that is stored in your initial working directory (your home directory unless you change it). The code you place into this file will run on startup. For example you could include the following code to load a package called GEOquery:

library(GEOquery)

or

require(GEOquery)

How to remove the requirement

  1. Determine working directory for RStudio. This can be your /home/<userid> folder, or another folder.
  2. Find the .Rprofile file. Note, the dot in front. This is a hidden file. In Nautilus press Ctrl+H to un-hide the hidden files.
  3. Double click the .Rprofile file to open it in gedit. Remove the line with GEOqury.

Source: https://stackoverflow.com/questions/10300769/how-to-load-packages-in-r-automatically

Hope this helps

user68186
  • 37,461
0

Reviving this old post for people who ended up here like me but the solution provided was not sufficient.

I had this same problem for a different R package but that package was not a listed required package in my .Rprofile. It turned out that I had previously produced and saved an object to my environment using the removed package. Loading R or installing packages that had a similar dependency would output the same message.

Loading required package: xxx
Error in .requirePackage(package) : 
unable to find required package ‘xxx’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
there is no package called ‘xxx’

My solution was finding the object in the environment and removing it by rm(xxx). Problem solved!

Dieter
  • 1