large number of packages attached in a fresh R session

92 views Asked by At

[Env: Windows 7, R version 3.6.3]

Something has happened to my R GUI installation, such that when I launch R from the desktop icon, a large number of packages are automatically loaded by a namespace (not attached).

Why this is a problem: When I try to update packages, those already attached cause the update to fail.

Here is what it looks like in a "fresh session"

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] myutil_1.6-0

loaded via a namespace (and not attached):
 [1] magrittr_2.0.1    usethis_2.0.0     devtools_2.3.2    pkgload_1.1.0    
 [5] R6_2.5.0          rlang_0.4.10      fastmap_1.0.1     fansi_0.4.2      
 [9] tools_3.6.3       pkgbuild_1.2.0    sessioninfo_1.1.1 cli_2.2.0        
[13] withr_2.4.1       ellipsis_0.3.1    remotes_2.2.0     assertthat_0.2.1 
[17] rprojroot_2.0.2   lifecycle_0.2.0   crayon_1.3.4      processx_3.4.5   
[21] purrr_0.3.4       callr_3.5.1       fs_1.5.0          ps_1.5.0         
[25] testthat_3.0.1    memoise_2.0.0     glue_1.4.2        cachem_1.0.1     
[29] compiler_3.6.3    desc_1.2.0        prettyunits_1.1.1 jsonlite_1.7.2   
> 

I have my own local package, myutil which is loaded by my .Rprofile, but that doesn't load/attach any other packages.

Somehow, I think a cache of packages must have been created. How can I undo this, and restore my system to a state w/o these namespace loaded packages?

Edit In reply to @r2evans, here it the DESCRIPTION info. I'm not sure how jsonlite got into Imports, but that is all.

> packageDescription("myutil")
Package: myutil
Type: Package
Title: My utility functions
Version: 1.6-0
Date: 2017-10-01
Author: Michael Friendly
Maintainer: Michael Friendly <[email protected]>
Description: A collection of my utility functions for Rgui, prepared as
        a package.
License: GPL-2
Collate: 'man.R' 'myutil.R' 'rgb2col.R' 'sourceDir.R' 'ls.objects.R'
        .....
Imports: jsonlite
RoxygenNote: 6.0.1
RemoteType: github
RemoteHost: api.github.com
RemoteRepo: myutil
RemoteUsername: friendly
RemoteRef: master
RemoteSha: 1edae954e8e6b00323f6bc84f1902a791dd2b633
GithubRepo: myutil
GithubUsername: friendly
GithubRef: master
GithubSHA1: 1edae954e8e6b00323f6bc84f1902a791dd2b633
NeedsCompilation: no
Packaged: 2020-03-20 19:38:36 UTC; friendly
Built: R 3.6.3; ; 2020-03-20 19:38:36 UTC; windows
0

There are 0 answers