加载为什么出现error: $ operator is invalid for atomic vectors报错和解决方法

时间:2025-02-09 11:53:05

在Bioconductor上已经有人提了问题,并且有了回答(地址:/p/9136329/)

简单的说,就是Rstduio出来背锅,最新的RSQLite(v2.2.6)和Rstudio存在冲突,以后要么是RSQLite迁就RStduio,要么就是Rstudio迁就RQLite。

不过目前也不是不能用,以下是解决方法

方法1 手动设置环境变量

options(connectionObserver = NULL)

方法2: 装个旧版本RSQLite,2.2.5之前即可

("remotes")
remotes::install_version("RSQLite", "2.2.5")

对于windows用户,旧版本的编译需要Rtools,如果嫌麻烦,我手头存了一份已经编译好的版本,因此可以直接用下面的命令安装

("/static/RSQLite_2.2.",repos = NULL, type = "binary")