简体   繁体   中英

An error when trying to install a package related to R version

I am trying to install the package ggpubr using the command install.packages('ggpubr') but I'm getting the error:

Installing package into ‘/home/nasser/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘cowplot’ is not available

I then tried to install the package cowplot using install.packages('cowplot') command and again I got the following error Warning in install.packages: package 'cowplot' is not available (for R version 3.4.4)

I searched for a solution and found a suggestion to use the following command:

devtools::install_github("wilkelab/cowplot")

and I got this error ERROR: this R is version 3.4.4, package 'cowplot' requires R >= 3.5.0

After a long time searching for a solution, I ended up having no perfect solution.

Can you please suggest me a way to avoid this error?

You have version 3.4.4 of R installed. The package cowplot requires version 3.5.0 or higher. You must upgrade your version of R.

Sometimes this is not possible (such as on a work network). In these cases, an alternative is to install an older version of cowplot that does not have that requirement. Of course, this means you are using an older version of the package. Archives are available on CRAN for older package versions.

https://cran.r-project.org/src/contrib/Archive/cowplot/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM