Resetting R- unnecessary Loads in R and Rstudio

I installed the software several years ago for graduate school where our professor has a number of add-ons made that we all added. However, now I am at a different institution with different goals and uses for my R package but I can’t seem to get rid of the old add-ons and loads. Is there any way to just completely Reset my R to have it like it was when I first installed it. I have tried uninstalling and re-installing the software but confine to have the same issues. Any suggestions would be greatly appreciated. Thank you!

(i.e my problem is the following loads every time I open R and I would like it not to)

Loading required package: leaps
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘leaps’
Loading required package: Hmisc
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘Hmisc’
Loading required package: e1071
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘e1071’
Loading required package: survival
Loading required package: gmodels
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘gmodels’
Loading required package: nlme
Loading required package: ROCR
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘ROCR’
Loading required package: dunn.test
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘dunn.test’
Loading required package: ggplot2
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘ggplot2’
Error in file(filename, "r", encoding = encoding) :
cannot open the connection
In addition: Warning message:
In file(filename, "r", encoding = encoding) :
cannot open file 'r-startup-source.txt': No such file or directory

Are you getting any errors when you install? Do you have admin rights to the folder where R wants to install?

I think you should be able to ignore the old installation anyway.
Just download and install the latest version of R.
The download and install the latest version of RStudio.
Go into RStudio|Tools|Global Options|General and make sure it is pointing at the newest version of R.

Edit: Or maybe the problem is that RStudio/R is loading your old environment at startup and the requird packages aren't there. You can turn this off in the same dialogue box. I suggest not loading anything at startup or saving anything on exit. Do it manually.

1 Like