Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R can';t卸载软件包_R_Uninstallation_Install.packages - Fatal编程技术网

R can';t卸载软件包

R can';t卸载软件包,r,uninstallation,install.packages,R,Uninstallation,Install.packages,嗨,我卸载了一个软件包,但它看起来仍然可以访问,有人能帮忙吗?谢谢你 > remove.packages("RODBC") Removing package from ‘E:/R/R-3.3.3/library’ (as ‘lib’ is unspecified) > library(RODBC) # no error. it's still there > attr(sessionInfo()$otherPkgs$RODBC, "file") [1] "E:/R/R-3.

嗨,我卸载了一个软件包,但它看起来仍然可以访问,有人能帮忙吗?谢谢你

> remove.packages("RODBC")
Removing package from ‘E:/R/R-3.3.3/library’
(as ‘lib’ is unspecified)

> library(RODBC)
# no error. it's still there

> attr(sessionInfo()$otherPkgs$RODBC, "file")
[1] "E:/R/R-3.3.3/library/RODBC/Meta/package.rds"
# it really is there...


> remove.packages("dplyr")
Removing package from ‘E:/R/R-3.3.3/library’
(as ‘lib’ is unspecified)
> library(dplyr)
Error in library(dplyr) : there is no package called ‘dplyr’
# this guy is removed


> .Library
[1] "E:/R/R-3.3.3/library"

> .libPaths()
[1] "E:/R/R-3.3.3/library"

RODBC
是否可能在使用中无法移除

我以前也遇到过这种情况,我想我所做的就是从我的计算机上的文件资源管理器中找到包的文件夹并手动删除它

我也遇到过同样的问题,所以我尝试手动删除包,但发现我没有根权限。然后我关闭R,用sudo启动它,再次尝试删除包。但是,它对我很有用。

你的
.libpath()是什么?
?谢谢you@HongOoi请参阅OP Please中的更新在卸载attr(sessionInfo()$otherPkgs$RODBC,“文件”)后调用库后,attr(sessionInfo()$otherPkgs$RODBC,“文件”)返回什么?移除工作正常吗?使用中的文件没有错误吗?谢谢你@MrFlick我厌倦了你的代码:它确实显示包仍然存在。我猜移除没用。您知道如何修复吗?您可以重新启动R并再次尝试删除.packages。或者通过资源管理器删除RODBC目录。这只是一个普通的目录,没有什么特别的。