解决R 3.6.0下rvcheck版本过高导致安装clusterProfiler失败

> BiocManager::install("clusterProfiler")
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.0 (2019-04-26)


Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object 'get_fun_from_pkg' not found

--
> packageVersion("rvcheck")
[1] ‘0.2.1’
> remotes::install_version("rvcheck", version="0.1.8")
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All                                    
2: CRAN packages only                     
3: None                                   
4: rlang       (0.4.10  -> 1.0.1  ) [CRAN]
5: BiocManager (1.30.10 -> 1.30.16) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3
* installing *source* package ‘rvcheck’ ...
** package ‘rvcheck’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rvcheck)
> packageVersion("rvcheck")
[1] ‘0.1.8’
> BiocManager::install("clusterProfiler")

ok

> library(clusterProfiler)
clusterProfiler v3.14.3

ref:

安装clusterProfiler报错 - 简书

---

20220222 更新: rvcheck和clusterProfiler的作者是同一个. 而rvchech的作用是R version check...:

之前为了吐槽很多人问问题都是在使用早已不维护的老版本,写了rvcheck来帮忙检查版本
原文https://baijiahao.baidu.com/s?id=1649312278893421774&wfr=spider&for=pc


既然已经写了这么多,顺便记录一下如何安装 不同版本的R包, 以clusterProfiler为例:

Bioconductor - BiocViewshttps://bioconductor.org/packages/

clusterProfiler_3.16.0.tar.gz

Index of /packages/3.11/bioc/src/contrib/Archive/clusterProfiler

clusterProfiler_3.14.3

Index of /packages/3.10/bioc/src/contrib/Archive/clusterProfiler

Index of /packages/3.11/bioc/src/contrib/Archive/clusterProfiler
    Name    Last modified    Size    Description
    Parent Directory         -     
    clusterProfiler_3.15.4.tar.gz    2020-04-28 16:35    2.5M     
    clusterProfiler_3.16.0.tar.gz    2020-08-19 13:45    2.5M     
Apache/2.4.18 (Ubuntu) Server at master.bioconductor.org Port 443

要安装3.16版本的clusterProfiler, 得先升级BiocManager, 从3.10到3.11

而不同版本的BiocManager对应着不同版本的R:

Bioconductor - Release Announcements

Release Date Software packages R
3.14 October 27, 2021 2083 4.1
3.13 May 20, 2021 2042 4.1
3.12 October 28, 2020 1974 4.0
3.11 April 28, 2020 1903 4.0
3.10 October 30, 2019 1823 3.6
3.9 May 3, 2019 1741 3.6

所以如果要装不同版本的clusterProfiler, 得装相应版本的BiocManager对应的R...

你可能感兴趣的:(R,r语言)