[环境:Windows 7,R 版本 3.6.3]
我的 R GUI 安装发生了一些事情,因此当我从桌面图标启动 R 时,命名空间(未附加)会自动加载大量包。
为什么这是一个问题:当我尝试更新包时,那些已经附加的包会导致更新失败。
这是“新会话”中的样子
> 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
>
我有自己的本地包,myutil
由 my 加载.Rprofile
,但不会加载/附加任何其他包。
不知何故,我认为必须创建一个包缓存。如何撤消此操作,并将我的系统恢复到没有这些命名空间加载包的状态?
编辑
回复@r2evans,这里是描述信息。我不确定如何jsonlite
进入 Imports,但仅此而已。
> packageDescription("myutil")
Package: myutil
Type: Package
Title: My utility functions
Version: 1.6-0
Date: 2017-10-01
Author: Michael Friendly
Maintainer: Michael Friendly <friendly@yorku.ca>
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